diff options
Diffstat (limited to 'src/lib/daemon_destroy.c')
-rw-r--r-- | src/lib/daemon_destroy.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/lib/daemon_destroy.c b/src/lib/daemon_destroy.c index a236ba8f..ae8c33d8 100644 --- a/src/lib/daemon_destroy.c +++ b/src/lib/daemon_destroy.c | |||
@@ -37,7 +37,7 @@ stop_workers (struct MHD_Daemon *daemon) | |||
37 | { | 37 | { |
38 | MHD_socket fd; | 38 | MHD_socket fd; |
39 | unsigned int i; | 39 | unsigned int i; |
40 | 40 | ||
41 | mhd_assert (1 < daemon->worker_pool_size); | 41 | mhd_assert (1 < daemon->worker_pool_size); |
42 | mhd_assert (1 < daemon->threading_model); | 42 | mhd_assert (1 < daemon->threading_model); |
43 | if (daemon->was_quiesced) | 43 | if (daemon->was_quiesced) |
@@ -102,7 +102,7 @@ MHD_daemon_destroy (struct MHD_Daemon *daemon) | |||
102 | fd = daemon->listen_socket; | 102 | fd = daemon->listen_socket; |
103 | 103 | ||
104 | /* FIXME: convert from here to microhttpd2-style API! */ | 104 | /* FIXME: convert from here to microhttpd2-style API! */ |
105 | 105 | ||
106 | if (NULL != daemon->worker_pool) | 106 | if (NULL != daemon->worker_pool) |
107 | { /* Master daemon with worker pool. */ | 107 | { /* Master daemon with worker pool. */ |
108 | stop_workers (daemon); | 108 | stop_workers (daemon); |
@@ -114,9 +114,6 @@ MHD_daemon_destroy (struct MHD_Daemon *daemon) | |||
114 | if (MHD_TM_EXTERNAL_EVENT_LOOP != daemon->threading_model) | 114 | if (MHD_TM_EXTERNAL_EVENT_LOOP != daemon->threading_model) |
115 | { | 115 | { |
116 | /* Worker daemon or single daemon with internal thread(s). */ | 116 | /* Worker daemon or single daemon with internal thread(s). */ |
117 | if (! daemon->disallow_suspend_resume) | ||
118 | (void) MHD_resume_suspended_connections_ (daemon); | ||
119 | |||
120 | /* Separate thread(s) is used for polling sockets. */ | 117 | /* Separate thread(s) is used for polling sockets. */ |
121 | if (MHD_ITC_IS_VALID_(daemon->itc)) | 118 | if (MHD_ITC_IS_VALID_(daemon->itc)) |
122 | { | 119 | { |
@@ -137,7 +134,7 @@ MHD_daemon_destroy (struct MHD_Daemon *daemon) | |||
137 | #endif /* HAVE_LISTEN_SHUTDOWN */ | 134 | #endif /* HAVE_LISTEN_SHUTDOWN */ |
138 | mhd_assert (false); /* Should never happen */ | 135 | mhd_assert (false); /* Should never happen */ |
139 | } | 136 | } |
140 | 137 | ||
141 | if (! MHD_join_thread_ (daemon->pid.handle)) | 138 | if (! MHD_join_thread_ (daemon->pid.handle)) |
142 | { | 139 | { |
143 | MHD_PANIC (_("Failed to join a thread\n")); | 140 | MHD_PANIC (_("Failed to join a thread\n")); |
@@ -171,10 +168,10 @@ MHD_daemon_destroy (struct MHD_Daemon *daemon) | |||
171 | return; | 168 | return; |
172 | /* Cleanup that should be done only one time in master/single daemon. | 169 | /* Cleanup that should be done only one time in master/single daemon. |
173 | * Do not perform this cleanup in worker daemons. */ | 170 | * Do not perform this cleanup in worker daemons. */ |
174 | 171 | ||
175 | if (MHD_INVALID_SOCKET != fd) | 172 | if (MHD_INVALID_SOCKET != fd) |
176 | MHD_socket_close_chk_ (fd); | 173 | MHD_socket_close_chk_ (fd); |
177 | 174 | ||
178 | /* TLS clean up */ | 175 | /* TLS clean up */ |
179 | #ifdef HTTPS_SUPPORT | 176 | #ifdef HTTPS_SUPPORT |
180 | if (NULL != daemon->tls_api) | 177 | if (NULL != daemon->tls_api) |
@@ -191,7 +188,7 @@ MHD_daemon_destroy (struct MHD_Daemon *daemon) | |||
191 | #endif | 188 | #endif |
192 | } | 189 | } |
193 | #endif /* HTTPS_SUPPORT */ | 190 | #endif /* HTTPS_SUPPORT */ |
194 | 191 | ||
195 | #ifdef DAUTH_SUPPORT | 192 | #ifdef DAUTH_SUPPORT |
196 | free (daemon->nnc); | 193 | free (daemon->nnc); |
197 | MHD_mutex_destroy_chk_ (&daemon->nnc_lock); | 194 | MHD_mutex_destroy_chk_ (&daemon->nnc_lock); |