libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit f4a6e110acd20459f359854c05ba6b43e7cb8dad
parent 3a7f7a97ebb9894c31edb7c7f635784256fead73
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Thu, 24 Nov 2016 15:09:55 +0300

resume_suspended_connections(): Removed FIXME from code.

Diffstat:
Msrc/microhttpd/daemon.c | 17++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c @@ -2463,19 +2463,10 @@ resume_suspended_connections (struct MHD_Daemon *daemon) if (daemon->resuming) next = daemon->suspended_connections_head; - /* Clear the flag *only* if connections will be resumed otherwise - it may accidentally clear flag that was set at the same time in - another thread (just after 'if (MHD_NO != daemon->resuming)' in - this thread). - - FIXME: is this not prevented by the lock!? - - Clear flag *before* resuming connections otherwise new connection can - be set to "resuming" in other thread, but missed resuming in this - function at this time so clearing flag at end will clear it without - actually resuming of new connection. */ - if (NULL != next) - daemon->resuming = false; + + EXTRA_CHECK(NULL != next); + daemon->resuming = false; + while (NULL != (pos = next)) { #ifdef UPGRADE_SUPPORT