diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2016-11-24 15:09:55 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2016-11-24 15:09:55 +0300 |
commit | f4a6e110acd20459f359854c05ba6b43e7cb8dad (patch) | |
tree | 4e5fa46bc6d9239d6bce650905f688ee9a3dc78e | |
parent | 3a7f7a97ebb9894c31edb7c7f635784256fead73 (diff) | |
download | libmicrohttpd-f4a6e110acd20459f359854c05ba6b43e7cb8dad.tar.gz libmicrohttpd-f4a6e110acd20459f359854c05ba6b43e7cb8dad.zip |
resume_suspended_connections(): Removed FIXME from code.
-rw-r--r-- | src/microhttpd/daemon.c | 17 |
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 |