mirror of https://git.kore.io/kore.git
add listener to the list earlier.
This commit is contained in:
parent
19044919b2
commit
884d6d722e
|
@ -383,6 +383,9 @@ kore_listener_alloc(int family, const char *ccb)
|
|||
|
||||
l = kore_calloc(1, sizeof(struct listener));
|
||||
|
||||
nlisteners++;
|
||||
LIST_INSERT_HEAD(&listeners, l, list);
|
||||
|
||||
l->fd = -1;
|
||||
l->family = family;
|
||||
l->type = KORE_TYPE_LISTENER;
|
||||
|
@ -414,9 +417,6 @@ kore_listener_alloc(int family, const char *ccb)
|
|||
l->connect = NULL;
|
||||
}
|
||||
|
||||
nlisteners++;
|
||||
LIST_INSERT_HEAD(&listeners, l, list);
|
||||
|
||||
return (l);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue