Browse Source

Check clients match in epoll loop

master
Con Kolivas 10 years ago
parent
commit
b50f2ba86c
  1. 3
      src/connector.c

3
src/connector.c

@ -492,8 +492,7 @@ void *receiver(void *arg)
client = event.data.ptr;
/* Recheck this client still exists in the same form when it
* was queued. */
client = ref_client_by_id(cdata, client->id);
if (unlikely(!client))
if (unlikely(client != ref_client_by_id(cdata, client->id)))
continue;
if (event.events & (EPOLLERR | EPOLLHUP | EPOLLRDHUP)) {
/* Client disconnected */

Loading…
Cancel
Save