1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

handle any POLLIN before error

See if this can impact http://libwebsockets.org/trac/ticket/16

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2013-02-16 10:17:52 +08:00
parent 22524a65a2
commit c9ac31ee1c

View file

@ -932,7 +932,8 @@ libwebsocket_service_fd(struct libwebsocket_context *context,
/* handle session socket closed */
if (pollfd->revents & (POLLERR | POLLHUP)) {
if ((!pollfd->revents & POLLIN) &&
(pollfd->revents & (POLLERR | POLLHUP))) {
lwsl_debug("Session Socket %p (fd=%d) dead\n",
(void *)wsi, pollfd->fd);