[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 01/02: Fixed deadlock introduced by c5b4a9deb550ab5a8a0b
From: |
gnunet |
Subject: |
[libmicrohttpd] 01/02: Fixed deadlock introduced by c5b4a9deb550ab5a8a0bb36103a9547da21f8982 |
Date: |
Sat, 31 Oct 2020 18:58:58 +0100 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit cec7ee05dca77cd62cce9bb52e612b8c429d500f
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Sat Oct 31 19:28:04 2020 +0300
Fixed deadlock introduced by c5b4a9deb550ab5a8a0bb36103a9547da21f8982
---
src/microhttpd/daemon.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 640964b8..91ad5406 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -7109,11 +7109,15 @@ close_all_connections (struct MHD_Daemon *daemon)
mhd_assert (NULL != pos->urh);
if (! pos->thread_joined)
{
- /* No need to unlock "cleanup" mutex as upgraded connection
- * doesn't manipulate "cleanup" list. */
+ /* While "cleanup" list is not manipulated by "upgraded"
+ * connection, "cleanup" mutex is required for call of
+ * MHD_resume_connection() during finishing of "upgraded"
+ * thread. */
+ MHD_mutex_unlock_chk_ (&daemon->cleanup_connection_mutex);
if (! MHD_join_thread_ (pos->pid.handle))
MHD_PANIC (_ ("Failed to join a thread.\n"));
pos->thread_joined = true;
+ MHD_mutex_lock_chk_ (&daemon->cleanup_connection_mutex);
}
}
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.