[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libmicrohttpd] branch master updated: Fixed attempts to ac
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libmicrohttpd] branch master updated: Fixed attempts to accept incoming connection on shutdown of listen socket |
Date: |
Tue, 28 Feb 2017 20:35:53 +0100 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
The following commit(s) were added to refs/heads/master by this push:
new c36a7c7f Fixed attempts to accept incoming connection on shutdown of
listen socket
c36a7c7f is described below
commit c36a7c7f305d3aaab29ab88b3ef49fa192988965
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Tue Feb 28 22:34:16 2017 +0300
Fixed attempts to accept incoming connection on shutdown of listen socket
---
src/microhttpd/daemon.c | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 4fd1b8c6..803d55c2 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -3915,16 +3915,21 @@ MHD_epoll (struct MHD_Daemon *daemon,
}
if (daemon == events[i].data.ptr)
{
- unsigned int series_length = 0;
- /* Run 'accept' until it fails or daemon at limit of connections.
- * Do not accept more then 10 connections at once. The rest will
- * be accepted on next turn (level trigger is used for listen
- * socket). */
- while ( (MHD_YES == MHD_accept_connection (daemon)) &&
- (series_length < 10) &&
- (daemon->connections < daemon->connection_limit) &&
- (! daemon->at_limit) )
- series_length++;
+ /* Check for error conditions on listen socket. */
+ /* FIXME: Initiate MHD_quiesce_daemon() to prevent busy waiting?
*/
+ if (0 == (events[i].events & (EPOLLERR | EPOLLHUP)))
+ {
+ unsigned int series_length = 0;
+ /* Run 'accept' until it fails or daemon at limit of
connections.
+ * Do not accept more then 10 connections at once. The rest
will
+ * be accepted on next turn (level trigger is used for listen
+ * socket). */
+ while ( (MHD_YES == MHD_accept_connection (daemon)) &&
+ (series_length < 10) &&
+ (daemon->connections < daemon->connection_limit) &&
+ (! daemon->at_limit) )
+ series_length++;
+ }
continue;
}
/* this is an event relating to a 'normal' connection,
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [libmicrohttpd] branch master updated: Fixed attempts to accept incoming connection on shutdown of listen socket,
gnunet <=