From: Andy Green Date: Mon, 29 Feb 2016 02:08:26 +0000 (+0800) Subject: windows listen for pollhup X-Git-Tag: upstream/1.7.3~2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fupstream%2Flibwebsockets.git;a=commitdiff_plain;h=ea3cf82769d0a1a03020637a2f43d42d031c648c windows listen for pollhup After Ondraco https://github.com/warmcat/libwebsockets/issues/441 Signed-off-by: Andy Green --- diff --git a/changelog b/changelog index f8e9288..773cf1e 100644 --- a/changelog +++ b/changelog @@ -13,6 +13,8 @@ to tell if more headers had arrived. Result was if the browser didn't close the keepalive, we retained ah for the lifetime of the keepalive, using up the pool. +3) MAJOR windows-only-POLLHUP was not coming + v1.7.2 ====== diff --git a/lib/lws-plat-win.c b/lib/lws-plat-win.c index cff09db..6d731fc 100644 --- a/lib/lws-plat-win.c +++ b/lib/lws-plat-win.c @@ -387,7 +387,8 @@ lws_plat_insert_socket_into_fds(struct lws_context *context, struct lws *wsi) pt->fds[pt->fds_count++].revents = 0; pt->events[pt->fds_count] = WSACreateEvent(); - WSAEventSelect(wsi->sock, pt->events[pt->fds_count], LWS_POLLIN); + WSAEventSelect(wsi->sock, pt->events[pt->fds_count], + LWS_POLLIN | LWS_POLLHUP); } LWS_VISIBLE void