Call kore_connection_disconnect() when draining connections.

This way the disconnect callbacks are called properly when
workers are exiting.
This commit is contained in:
Joris Vink 2014-09-17 08:46:55 +02:00
parent 7771adbec2
commit 49e97ae6f8
1 changed files with 1 additions and 2 deletions

View File

@ -308,8 +308,7 @@ kore_worker_entry(struct kore_worker *kw)
for (c = TAILQ_FIRST(&worker_clients); c != NULL; c = cnext) {
cnext = TAILQ_NEXT(c, list);
net_send_flush(c);
TAILQ_REMOVE(&worker_clients, c, list);
kore_connection_remove(c);
kore_connection_disconnect(c);
}
for (c = TAILQ_FIRST(&disconnected); c != NULL; c = cnext) {