[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libmicrohttpd] 05/05: Handle resumed connections and close
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libmicrohttpd] 05/05: Handle resumed connections and closed "upgraded" connections in thread-per-connection mode with select(), do not use zero delay in MHD_poll_listen_socket() if connections are resumed |
Date: |
Sun, 14 May 2017 14:11:23 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit 6c991e0929c3fbbdfa0eee099ce52a2fb850da85
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Sun May 14 15:09:10 2017 +0300
Handle resumed connections and closed "upgraded" connections in
thread-per-connection mode with select(),
do not use zero delay in MHD_poll_listen_socket() if connections are resumed
---
ChangeLog | 4 ++++
src/microhttpd/daemon.c | 9 +++++----
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 2bc7bf0f..aabf1b9e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sun May 14 15:05:00 MSK 2017
+ Fixed resuming connections and closing upgraded connections in select()
+ mode with thread-per-connection. -EG
+
Sun May 14 14:49:00 MSK 2017
Removed extra call to resume connections in MHD_run().
Handle resumed connection without delay in epoll mode.
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index c26d461e..9bed84bc 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -3509,12 +3509,13 @@ MHD_select (struct MHD_Daemon *daemon,
FD_ZERO (&es);
maxsock = MHD_INVALID_SOCKET;
err_state = MHD_NO;
+ if ( (0 != (daemon->options & MHD_TEST_ALLOW_SUSPEND_RESUME)) &&
+ (MHD_YES == resume_suspended_connections (daemon)) &&
+ (0 == (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) )
+ may_block = MHD_NO;
+
if (0 == (daemon->options & MHD_USE_THREAD_PER_CONNECTION))
{
- if ( (0 != (daemon->options & MHD_TEST_ALLOW_SUSPEND_RESUME)) &&
- (MHD_YES == resume_suspended_connections (daemon)) )
- may_block = MHD_NO;
-
/* single-threaded, go over everything */
if (MHD_NO ==
internal_get_fdset2 (daemon,
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [libmicrohttpd] branch master updated (858483b5 -> 6c991e09), gnunet, 2017/05/14
- [GNUnet-SVN] [libmicrohttpd] 01/05: internal_run_from_select(): remove extra call for epoll run as epoll called directly, gnunet, 2017/05/14
- [GNUnet-SVN] [libmicrohttpd] 03/05: thread_main_handle_connection(): update states of connection after resume, gnunet, 2017/05/14
- [GNUnet-SVN] [libmicrohttpd] 05/05: Handle resumed connections and closed "upgraded" connections in thread-per-connection mode with select(), do not use zero delay in MHD_poll_listen_socket() if connections are resumed,
gnunet <=
- [GNUnet-SVN] [libmicrohttpd] 02/05: Improved resume_suspended_connections() handling: Removed extra call from MHD_run(), moved call in MHD_epoll() so resumed connections are handled without delay, gnunet, 2017/05/14
- [GNUnet-SVN] [libmicrohttpd] 04/05: MHD_poll_listen_socket(): handle resumed connections and closed "upgraded" connections, gnunet, 2017/05/14