diff options
author | Simon Rettberg | 2015-02-25 17:50:33 +0100 |
---|---|---|
committer | Simon Rettberg | 2015-02-25 17:50:33 +0100 |
commit | dd1b647b0b8193a58c047daee6079417b07a5ac5 (patch) | |
tree | f943759257defe1f57bf1921b84a483e3be8494b /client.c | |
parent | Hack in support for numeric account names (diff) | |
download | ldadp-dd1b647b0b8193a58c047daee6079417b07a5ac5.tar.gz ldadp-dd1b647b0b8193a58c047daee6079417b07a5ac5.tar.xz ldadp-dd1b647b0b8193a58c047daee6079417b07a5ac5.zip |
Fix epoll based detection of closed connections
Diffstat (limited to 'client.c')
-rw-r--r-- | client.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -31,7 +31,7 @@ void client_callback(void *data, int haveIn, int haveOut, int doCleanup) { epoll_client_t *client = (epoll_client_t*)data; if (doCleanup || client->kill) { - printf("Client gone.\n"); + printf("Client gone (1).\n"); client_free(client); return; } @@ -39,7 +39,10 @@ void client_callback(void *data, int haveIn, int haveOut, int doCleanup) // Plain connection if (haveIn) client_haveIn(client); if (haveOut) client_haveOut(client); - if (client->kill) client_free(client); + if (client->kill) { + printf("Client gone (2).\n"); + client_free(client); + } return; } // SSL connection @@ -56,7 +59,7 @@ void client_callback(void *data, int haveIn, int haveOut, int doCleanup) client_haveIn(client); client_haveOut(client); if (client->kill) { - printf("Client killed.\n"); + printf("Client gone (3).\n"); client_free(client); } } |