From 8fea3c91926e00a8810ac3e68d9d5a24ce5cc823 Mon Sep 17 00:00:00 2001 From: "Evgeny Grin (Karlson2k)" Date: Thu, 6 Oct 2022 13:28:50 +0300 Subject: [PATCH] daemon: fixed delayed notification callback in thread-per-connection mode --- src/microhttpd/daemon.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index 6f7bfb58..a9164341 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c @@ -6873,8 +6873,9 @@ MHD_start_daemon_va (unsigned int flags, } #endif - if ( (NULL != daemon->notify_completed) && - (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) ) + if ( (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) + && ((NULL != daemon->notify_completed) + || (NULL != daemon->notify_connection)) ) *pflags |= MHD_USE_ITC; /* requires ITC */ #ifndef NDEBUG