windows listen for pollhup
authorAndy Green <andy.green@linaro.org>
Mon, 29 Feb 2016 02:10:42 +0000 (10:10 +0800)
committerAndy Green <andy.green@linaro.org>
Mon, 29 Feb 2016 02:34:58 +0000 (10:34 +0800)
After Ondraco

https://github.com/warmcat/libwebsockets/issues/441

Signed-off-by: Andy Green <andy.green@linaro.org>
changelog
lib/lws-plat-win.c

index 4580d42..92035c9 100644 (file)
--- a/changelog
+++ b/changelog
@@ -36,6 +36,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.
 
+8) MAJOR windows-only-POLLHUP was not coming
+
 
 Changes
 -------
index cff09db..6d731fc 100644 (file)
@@ -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