commit 18a607a51883dc185a8150f0a4ca4d6ada9777c7
parent 0d9046effaaf2cc65ef65792c84311011916bdca
Author: Christian Grothoff <christian@grothoff.org>
Date: Sat, 8 Dec 2018 23:18:08 +0100
use WSA_FLAG_OVERLAPPED in W32 sockets as per suggestion from Johnathan McDougall on the mailinglist
Diffstat:
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,8 @@
+Sat Dec 8 23:15:53 CET 2018
+ Fixed missing WSA_FLAG_OVERLAPPED which can cause W32 to block on
+ socket races when using threadpool. (See very detailed description
+ of the issue in the libmicrohttpd mailinglist post of today.) -JM
+
Sat Dec 8 22:53:56 CET 2018
Added test for RFC 7616 and documented new API.
Releasing libmicrohttpd 0.9.62. -CG
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
@@ -126,7 +126,7 @@ typedef intptr_t ssize_t;
* Current version of the library.
* 0x01093001 = 1.9.30-1.
*/
-#define MHD_VERSION 0x00096200
+#define MHD_VERSION 0x00096201
/**
* MHD-internal return code for "YES".
diff --git a/src/microhttpd/mhd_sockets.c b/src/microhttpd/mhd_sockets.c
@@ -484,7 +484,7 @@ MHD_socket_create_listen_ (int pf)
0,
NULL,
0,
- WSA_FLAG_NO_HANDLE_INHERIT);
+ WSA_FLAG_OVERLAPPED | WSA_FLAG_NO_HANDLE_INHERIT);
cloexec_set = !0;
#else /* !SOCK_CLOEXEC */
fd = MHD_INVALID_SOCKET;