From 1799b02a436710c5ca1dd33af676f6cc1340c28c Mon Sep 17 00:00:00 2001 From: Andy Green Date: Sun, 15 Oct 2017 12:24:24 +0800 Subject: [PATCH] windows: POLLHUP is or-ed on other events https://github.com/warmcat/libwebsockets/issues/1054 --- lib/plat/lws-plat-win.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/plat/lws-plat-win.c b/lib/plat/lws-plat-win.c index ed1c92eb..864df181 100644 --- a/lib/plat/lws-plat-win.c +++ b/lib/plat/lws-plat-win.c @@ -258,9 +258,8 @@ _lws_plat_service_tsi(struct lws_context *context, int timeout_ms, int tsi) networkevents.iErrorCode[FD_CONNECT_BIT] != WSAEINVAL) { lwsl_debug("Unable to connect errno=%d\n", networkevents.iErrorCode[FD_CONNECT_BIT]); - pfd->revents = LWS_POLLHUP; - } else - pfd->revents = (short)networkevents.lNetworkEvents; + pfd->revents |= LWS_POLLHUP; + } if (pfd->revents & LWS_POLLOUT) { wsi = wsi_from_fd(context, pfd->fd);