mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 04:33:05 +00:00
bugfix
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user