add listener to the list earlier.

This commit is contained in:
Joris Vink 2018-10-07 21:25:00 +02:00
parent 19044919b2
commit 884d6d722e
1 changed files with 3 additions and 3 deletions

View File

@ -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);
}