commit 80d4152e1f287d1572833246dcc3aa676410e9f4 parent 5b01262799b1eef4e78b0264f9715fbf7bff1857 Author: Evgeny Grin (Karlson2k) <k2k@narod.ru> Date: Mon, 24 Oct 2016 21:17:27 +0300 Used smaller locked mutex scope. Diffstat:
| M | src/microhttpd/daemon.c | | | 4 | ++-- |
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c @@ -2422,6 +2422,8 @@ MHD_resume_connection (struct MHD_Connection *connection) MHD_mutex_lock_chk_ (&daemon->cleanup_connection_mutex); connection->resuming = MHD_YES; daemon->resuming = MHD_YES; + if (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) + MHD_mutex_unlock_chk_ (&daemon->cleanup_connection_mutex); if ( (MHD_ITC_IS_VALID_(daemon->itc)) && (! MHD_itc_activate_ (daemon->itc, "r")) ) { @@ -2430,8 +2432,6 @@ MHD_resume_connection (struct MHD_Connection *connection) _("Failed to signal resume via inter-thread communication channel.")); #endif } - if (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) - MHD_mutex_unlock_chk_ (&daemon->cleanup_connection_mutex); }