gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] 01/03: MHD_add_connection(): do not cleanup if not safe


From: gnunet
Subject: [libmicrohttpd] 01/03: MHD_add_connection(): do not cleanup if not safe
Date: Tue, 20 Oct 2020 21:13:37 +0200

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit ccd676036751f15a8a7558640660620848b40d6b
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Tue Oct 20 10:27:27 2020 +0300

    MHD_add_connection(): do not cleanup if not safe
---
 src/microhttpd/daemon.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 2eefdef5..d966ece5 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -3209,7 +3209,11 @@ MHD_add_connection (struct MHD_Daemon *daemon,
 {
   bool sk_nonbl;
 
-  MHD_cleanup_connections (daemon);
+  /* NOT thread safe with internal thread. TODO: fix thread safety. */
+  if ((0 == (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) &&
+      (daemon->connection_limit <= daemon->connections))
+    MHD_cleanup_connections (daemon);
+
   if (! MHD_socket_nonblocking_ (client_socket))
   {
 #ifdef HAVE_MESSAGES

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]