gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] 09/10: Adjusted default value of maximum connections


From: gnunet
Subject: [libmicrohttpd] 09/10: Adjusted default value of maximum connections
Date: Wed, 01 Nov 2023 11:52:24 +0100

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 5f8e3c9b93d13553a4e0d9df406091888a05dc7c
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Wed Nov 1 13:35:49 2023 +0300

    Adjusted default value of maximum connections
---
 src/microhttpd/daemon.c  |  2 +-
 src/microhttpd/mhd_itc.h | 14 ++++++++++++++
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index d06e5cc5..2c3dbe1a 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -77,7 +77,7 @@
  * Default connection limit.
  */
 #ifdef MHD_POSIX_SOCKETS
-#define MHD_MAX_CONNECTIONS_DEFAULT (FD_SETSIZE - 4)
+#define MHD_MAX_CONNECTIONS_DEFAULT (FD_SETSIZE - 3 - 1 - MHD_ITC_NUM_FDS_)
 #else
 #define MHD_MAX_CONNECTIONS_DEFAULT (FD_SETSIZE - 2)
 #endif
diff --git a/src/microhttpd/mhd_itc.h b/src/microhttpd/mhd_itc.h
index 3822c164..780a6c53 100644
--- a/src/microhttpd/mhd_itc.h
+++ b/src/microhttpd/mhd_itc.h
@@ -61,6 +61,10 @@
 #include <errno.h>
 #endif
 
+/**
+ * Number of FDs used by every ITC.
+ */
+#define MHD_ITC_NUM_FDS_ (1)
 
 /**
  * Initialise ITC by generating eventFD
@@ -155,6 +159,11 @@ static const uint64_t _MHD_itc_wr_data = 1;
 #endif
 
 
+/**
+ * Number of FDs used by every ITC.
+ */
+#define MHD_ITC_NUM_FDS_ (2)
+
 /**
  * Initialise ITC by generating pipe
  * @param itc the itc to initialise
@@ -256,6 +265,11 @@ MHD_itc_nonblocking_ (struct MHD_itc_ itc);
 #include "mhd_sockets.h"
 
 
+/**
+ * Number of FDs used by every ITC.
+ */
+#define MHD_ITC_NUM_FDS_ (2)
+
 /**
  * Initialise ITC by generating socketpair
  * @param itc the itc to initialise

-- 
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]