This commit is contained in:
云风
2013-06-04 10:30:27 +08:00
parent f1f40e1640
commit 438676c703

View File

@@ -40,11 +40,11 @@ gate_create(void) {
static inline struct connection *
_id_to_agent(struct gate *g,int uid) {
struct connection * c = g->agent[uid & (g->cap - 1)];
if (c->uid != uid) {
return NULL;
struct connection * agent = g->agent[uid & (g->cap - 1)];
if (agent && agent->uid == uid) {
return agent;
}
return c;
return NULL;
}
static void