aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/connection.c')
-rw-r--r--src/microhttpd/connection.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 858540c2..de478c86 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -2079,16 +2079,23 @@ cleanup_connection (struct MHD_Connection *connection)
2079 XDLL_remove (daemon->manual_timeout_head, 2079 XDLL_remove (daemon->manual_timeout_head,
2080 daemon->manual_timeout_tail, 2080 daemon->manual_timeout_tail,
2081 connection); 2081 connection);
2082 DLL_remove (daemon->connections_head, 2082 if (MHD_YES == connection->suspended)
2083 daemon->connections_tail, 2083 DLL_remove (daemon->suspended_connections_head,
2084 connection); 2084 daemon->suspended_connections_tail,
2085 connection);
2086 else
2087 DLL_remove (daemon->connections_head,
2088 daemon->connections_tail,
2089 connection);
2085 DLL_insert (daemon->cleanup_head, 2090 DLL_insert (daemon->cleanup_head,
2086 daemon->cleanup_tail, 2091 daemon->cleanup_tail,
2087 connection); 2092 connection);
2093 connection->suspended = MHD_NO;
2094 connection->resuming = MHD_NO;
2095 connection->in_idle = MHD_NO;
2088 if ( (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) && 2096 if ( (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) &&
2089 (0 != pthread_mutex_unlock(&daemon->cleanup_connection_mutex)) ) 2097 (0 != pthread_mutex_unlock(&daemon->cleanup_connection_mutex)) )
2090 MHD_PANIC ("Failed to release cleanup mutex\n"); 2098 MHD_PANIC ("Failed to release cleanup mutex\n");
2091 connection->in_idle = MHD_NO;
2092} 2099}
2093 2100
2094 2101