From 0231ccab63105fe2f1931428644a4b790aafcc26 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 29 Feb 2016 14:28:37 +0100 Subject: [PATCH] On WCE close the connection immediately --- lib/libwebsockets.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/libwebsockets.c b/lib/libwebsockets.c index 65efd7e65..6ebee7f9e 100644 --- a/lib/libwebsockets.c +++ b/lib/libwebsockets.c @@ -344,6 +344,9 @@ just_kill_connection: if (n) lwsl_debug("closing: shutdown ret %d\n", LWS_ERRNO); +// This causes problems with disconnection when the events are half closing connection +// FD_READ | FD_CLOSE (33) +#ifndef _WIN32_WCE /* libuv: no event available to guarantee completion */ if (!LWS_LIBUV_ENABLED(context)) { @@ -353,6 +356,7 @@ just_kill_connection: context->timeout_secs); return; } +#endif } #endif