From 49ce58794930d4a4b58b9fed686c007a62076b7c Mon Sep 17 00:00:00 2001 From: ckolivas Date: Wed, 22 Apr 2015 14:17:52 +1000 Subject: [PATCH] nolinger client sockets when we're about to close them --- src/connector.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/connector.c b/src/connector.c index 5fc9fcec..ea1a0a45 100644 --- a/src/connector.c +++ b/src/connector.c @@ -257,7 +257,8 @@ static int drop_client(cdata_t *cdata, client_instance_t *client) if (fd != -1) { client_id = client->id; - epoll_ctl(cdata->epfd, EPOLL_CTL_DEL, client->fd, NULL); + epoll_ctl(cdata->epfd, EPOLL_CTL_DEL, fd, NULL); + nolinger_socket(fd); Close(client->fd); HASH_DEL(cdata->clients, client); DL_APPEND(cdata->dead_clients, client);