diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-11-04 14:36:04 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-11-04 14:36:04 +0100 |
commit | a0118ad4e17359e8b1d836aec2d40b43d414c1d3 (patch) | |
tree | 46a9f7b10d4d90d744a094f38dce6d53a4b4a393 | |
parent | 86706fd27dde169fef4146d4014f948c2d7ffe55 (diff) | |
download | libmicrohttpd-a0118ad4e17359e8b1d836aec2d40b43d414c1d3.tar.gz libmicrohttpd-a0118ad4e17359e8b1d836aec2d40b43d414c1d3.zip |
reverting dd327c1d13252373cd1730e445d19930417571bf as it introduces a race on 'resuming' which was previously deliberately avoided
-rw-r--r-- | src/microhttpd/daemon.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index e25f96fe..c1e5cffe 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c | |||
@@ -2455,12 +2455,11 @@ resume_suspended_connections (struct MHD_Daemon *daemon) | |||
2455 | int ret; | 2455 | int ret; |
2456 | 2456 | ||
2457 | ret = MHD_NO; | 2457 | ret = MHD_NO; |
2458 | if (MHD_NO == daemon->resuming) | ||
2459 | return ret; | ||
2460 | if (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) | 2458 | if (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) |
2461 | MHD_mutex_lock_chk_ (&daemon->cleanup_connection_mutex); | 2459 | MHD_mutex_lock_chk_ (&daemon->cleanup_connection_mutex); |
2462 | 2460 | ||
2463 | next = daemon->suspended_connections_head; | 2461 | if (MHD_NO != daemon->resuming) |
2462 | next = daemon->suspended_connections_head; | ||
2464 | /* Clear the flag *only* if connections will be resumed otherwise | 2463 | /* Clear the flag *only* if connections will be resumed otherwise |
2465 | it may accidentally clear flag that was set at the same time in | 2464 | it may accidentally clear flag that was set at the same time in |
2466 | other thread (just after 'if (MHD_NO != daemon->resuming)' in | 2465 | other thread (just after 'if (MHD_NO != daemon->resuming)' in |