diff options
Diffstat (limited to 'src/microhttpd/daemon.c')
-rw-r--r-- | src/microhttpd/daemon.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index 006e8d54..b192dbfb 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c | |||
@@ -3569,7 +3569,7 @@ run_epoll_for_upgrade (struct MHD_Daemon *daemon) | |||
3569 | struct MHD_UpgradeResponseHandle * const urh = ueh->urh; | 3569 | struct MHD_UpgradeResponseHandle * const urh = ueh->urh; |
3570 | 3570 | ||
3571 | /* Each MHD_UpgradeResponseHandle can be processed two times: | 3571 | /* Each MHD_UpgradeResponseHandle can be processed two times: |
3572 | * one for TLS data and one for socketpair data. | 3572 | * one time for TLS data and one time for socketpair data. |
3573 | * If forwarding was finished on first time, second time must | 3573 | * If forwarding was finished on first time, second time must |
3574 | * be skipped as urh must not be used anymore. */ | 3574 | * be skipped as urh must not be used anymore. */ |
3575 | if (MHD_NO != urh->clean_ready) | 3575 | if (MHD_NO != urh->clean_ready) |
@@ -3915,10 +3915,11 @@ close_connection (struct MHD_Connection *pos) | |||
3915 | { | 3915 | { |
3916 | struct MHD_Daemon *daemon = pos->daemon; | 3916 | struct MHD_Daemon *daemon = pos->daemon; |
3917 | 3917 | ||
3918 | pos->state = MHD_CONNECTION_CLOSED; | ||
3919 | pos->event_loop_info = MHD_EVENT_LOOP_INFO_CLEANUP; | ||
3920 | if (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) | 3918 | if (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) |
3921 | return; /* must let thread to the rest */ | 3919 | { |
3920 | MHD_connection_mark_closed_ (pos); | ||
3921 | return; /* must let thread to do the rest */ | ||
3922 | } | ||
3922 | MHD_connection_close_ (pos, | 3923 | MHD_connection_close_ (pos, |
3923 | MHD_REQUEST_TERMINATED_DAEMON_SHUTDOWN); | 3924 | MHD_REQUEST_TERMINATED_DAEMON_SHUTDOWN); |
3924 | if (pos->connection_timeout == pos->daemon->connection_timeout) | 3925 | if (pos->connection_timeout == pos->daemon->connection_timeout) |