commit 25d381f4c004feda143e614406a6329864c76073
parent 6f6a4e220b2a02b86364cfe093570ad4ddd06860
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Sun, 26 Mar 2017 22:00:41 +0300
Fixed MHD_quiesce_daemon() after 7b0d92902c92782844e84e40ab54d58a65531a65
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
@@ -4643,7 +4643,7 @@ MHD_quiesce_daemon (struct MHD_Daemon *daemon)
ret = daemon->listen_fd;
if (MHD_INVALID_SOCKET == ret)
return MHD_INVALID_SOCKET;
- if ( (MHD_ITC_IS_INVALID_(daemon->itc)) &&
+ if ( (0 == (daemon->options & (MHD_USE_ITC))) &&
(0 != (daemon->options & (MHD_USE_INTERNAL_POLLING_THREAD))) )
{
#ifdef HAVE_MESSAGES
@@ -5978,6 +5978,8 @@ MHD_start_daemon_va (unsigned int flags,
goto thread_failed;
}
}
+ else
+ MHD_itc_set_invalid_ (d->itc);
/* Divide available connections evenly amongst the threads.
* Thread indexes in [0, leftover_conns) each get one of the