diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-10-29 20:27:54 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-10-29 20:27:54 +0100 |
commit | 533124d379d0c0e3e1efa9a4c9bcccd4e6a8bdba (patch) | |
tree | e459b8388b75b88b51f65140ad447d9047b6a140 /src/microhttpd/daemon.c | |
parent | 4728124102d38067bd2e497b216b12aaee6dea53 (diff) | |
download | libmicrohttpd-533124d379d0c0e3e1efa9a4c9bcccd4e6a8bdba.tar.gz libmicrohttpd-533124d379d0c0e3e1efa9a4c9bcccd4e6a8bdba.zip |
fix possibly bad clearing of client_aware flag
Diffstat (limited to 'src/microhttpd/daemon.c')
-rw-r--r-- | src/microhttpd/daemon.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index 0480af95..cede2f53 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c | |||
@@ -2875,11 +2875,13 @@ resume_suspended_connections (struct MHD_Daemon *daemon) | |||
2875 | if ( (NULL != daemon->notify_completed) && | 2875 | if ( (NULL != daemon->notify_completed) && |
2876 | (0 == (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) && | 2876 | (0 == (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) && |
2877 | (pos->client_aware) ) | 2877 | (pos->client_aware) ) |
2878 | daemon->notify_completed (daemon->notify_completed_cls, | 2878 | { |
2879 | pos, | 2879 | daemon->notify_completed (daemon->notify_completed_cls, |
2880 | &pos->client_context, | 2880 | pos, |
2881 | MHD_REQUEST_TERMINATED_COMPLETED_OK); | 2881 | &pos->client_context, |
2882 | pos->client_aware = false; | 2882 | MHD_REQUEST_TERMINATED_COMPLETED_OK); |
2883 | pos->client_aware = false; | ||
2884 | } | ||
2883 | DLL_insert (daemon->cleanup_head, | 2885 | DLL_insert (daemon->cleanup_head, |
2884 | daemon->cleanup_tail, | 2886 | daemon->cleanup_tail, |
2885 | pos); | 2887 | pos); |
@@ -3431,8 +3433,9 @@ MHD_run_from_select (struct MHD_Daemon *daemon, | |||
3431 | if (0 != (daemon->options & MHD_USE_EPOLL)) | 3433 | if (0 != (daemon->options & MHD_USE_EPOLL)) |
3432 | { | 3434 | { |
3433 | #ifdef EPOLL_SUPPORT | 3435 | #ifdef EPOLL_SUPPORT |
3434 | int ret; | 3436 | int ret = MHD_epoll (daemon, |
3435 | ret = MHD_epoll (daemon, MHD_NO); | 3437 | MHD_NO); |
3438 | |||
3436 | MHD_cleanup_connections (daemon); | 3439 | MHD_cleanup_connections (daemon); |
3437 | return ret; | 3440 | return ret; |
3438 | #else /* ! EPOLL_SUPPORT */ | 3441 | #else /* ! EPOLL_SUPPORT */ |