diff options
Diffstat (limited to 'src/microhttpd/daemon.c')
-rw-r--r-- | src/microhttpd/daemon.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index be7c79a7..b7d0e0e7 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c | |||
@@ -3691,10 +3691,12 @@ close_connection (struct MHD_Connection *pos) | |||
3691 | { | 3691 | { |
3692 | struct MHD_Daemon *daemon = pos->daemon; | 3692 | struct MHD_Daemon *daemon = pos->daemon; |
3693 | 3693 | ||
3694 | MHD_connection_close_ (pos, | 3694 | pos->state = MHD_CONNECTION_CLOSED; |
3695 | MHD_REQUEST_TERMINATED_DAEMON_SHUTDOWN); | 3695 | pos->event_loop_info = MHD_EVENT_LOOP_INFO_CLEANUP; |
3696 | if (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) | 3696 | if (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) |
3697 | return; /* must let thread to the rest */ | 3697 | return; /* must let thread to the rest */ |
3698 | MHD_connection_close_ (pos, | ||
3699 | MHD_REQUEST_TERMINATED_DAEMON_SHUTDOWN); | ||
3698 | if (pos->connection_timeout == pos->daemon->connection_timeout) | 3700 | if (pos->connection_timeout == pos->daemon->connection_timeout) |
3699 | XDLL_remove (daemon->normal_timeout_head, | 3701 | XDLL_remove (daemon->normal_timeout_head, |
3700 | daemon->normal_timeout_tail, | 3702 | daemon->normal_timeout_tail, |
@@ -3706,7 +3708,6 @@ close_connection (struct MHD_Connection *pos) | |||
3706 | DLL_remove (daemon->connections_head, | 3708 | DLL_remove (daemon->connections_head, |
3707 | daemon->connections_tail, | 3709 | daemon->connections_tail, |
3708 | pos); | 3710 | pos); |
3709 | pos->event_loop_info = MHD_EVENT_LOOP_INFO_CLEANUP; | ||
3710 | DLL_insert (daemon->cleanup_head, | 3711 | DLL_insert (daemon->cleanup_head, |
3711 | daemon->cleanup_tail, | 3712 | daemon->cleanup_tail, |
3712 | pos); | 3713 | pos); |