libmicrohttpd

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

commit 533124d379d0c0e3e1efa9a4c9bcccd4e6a8bdba
parent 4728124102d38067bd2e497b216b12aaee6dea53
Author: Christian Grothoff <christian@grothoff.org>
Date:   Mon, 29 Oct 2018 20:27:54 +0100

fix possibly bad clearing of client_aware flag

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

diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c @@ -2875,11 +2875,13 @@ resume_suspended_connections (struct MHD_Daemon *daemon) if ( (NULL != daemon->notify_completed) && (0 == (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) && (pos->client_aware) ) - daemon->notify_completed (daemon->notify_completed_cls, - pos, - &pos->client_context, - MHD_REQUEST_TERMINATED_COMPLETED_OK); - pos->client_aware = false; + { + daemon->notify_completed (daemon->notify_completed_cls, + pos, + &pos->client_context, + MHD_REQUEST_TERMINATED_COMPLETED_OK); + pos->client_aware = false; + } DLL_insert (daemon->cleanup_head, daemon->cleanup_tail, pos); @@ -3431,8 +3433,9 @@ MHD_run_from_select (struct MHD_Daemon *daemon, if (0 != (daemon->options & MHD_USE_EPOLL)) { #ifdef EPOLL_SUPPORT - int ret; - ret = MHD_epoll (daemon, MHD_NO); + int ret = MHD_epoll (daemon, + MHD_NO); + MHD_cleanup_connections (daemon); return ret; #else /* ! EPOLL_SUPPORT */