aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/daemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/daemon.c')
-rw-r--r--src/microhttpd/daemon.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 9300a43f..91e281e5 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -2463,19 +2463,10 @@ resume_suspended_connections (struct MHD_Daemon *daemon)
2463 2463
2464 if (daemon->resuming) 2464 if (daemon->resuming)
2465 next = daemon->suspended_connections_head; 2465 next = daemon->suspended_connections_head;
2466 /* Clear the flag *only* if connections will be resumed otherwise 2466
2467 it may accidentally clear flag that was set at the same time in 2467 EXTRA_CHECK(NULL != next);
2468 another thread (just after 'if (MHD_NO != daemon->resuming)' in 2468 daemon->resuming = false;
2469 this thread). 2469
2470
2471 FIXME: is this not prevented by the lock!?
2472
2473 Clear flag *before* resuming connections otherwise new connection can
2474 be set to "resuming" in other thread, but missed resuming in this
2475 function at this time so clearing flag at end will clear it without
2476 actually resuming of new connection. */
2477 if (NULL != next)
2478 daemon->resuming = false;
2479 while (NULL != (pos = next)) 2470 while (NULL != (pos = next))
2480 { 2471 {
2481#ifdef UPGRADE_SUPPORT 2472#ifdef UPGRADE_SUPPORT