Browse Source

Allow the socket close to be responsible for removing client fds from the epoll list

master
Con Kolivas 9 years ago
parent
commit
2ed69d2534
  1. 2
      src/connector.c

2
src/connector.c

@ -333,8 +333,8 @@ static int __drop_client(cdata_t *cdata, client_instance_t *client)
goto out;
client->invalid = true;
ret = client->fd;
/* Closing the fd will automatically remove it from the epoll list */
Close(client->fd);
epoll_ctl(cdata->epfd, EPOLL_CTL_DEL, ret, NULL);
HASH_DEL(cdata->clients, client);
DL_APPEND(cdata->dead_clients, client);
/* This is the reference to this client's presence in the

Loading…
Cancel
Save