[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 02/02: Speed-up closure of upgraded connection with daem
From: |
gnunet |
Subject: |
[libmicrohttpd] 02/02: Speed-up closure of upgraded connection with daemon shutdown |
Date: |
Sat, 31 Oct 2020 18:58:59 +0100 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit 9a224cc6eda2c42f2775ff7740753436bbee90ef
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Sat Oct 31 20:25:06 2020 +0300
Speed-up closure of upgraded connection with daemon shutdown
---
src/microhttpd/daemon.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 91ad5406..f75d02b1 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -1734,8 +1734,9 @@ thread_main_connection_upgrade (struct MHD_Connection
*con)
{
struct timeval*tvp;
struct timeval tv;
- if ( (con->tls_read_ready) &&
- (urh->in_buffer_used < urh->in_buffer_size))
+ if (((con->tls_read_ready) &&
+ (urh->in_buffer_used < urh->in_buffer_size)) ||
+ (daemon->shutdown))
{ /* No need to wait if incoming data is already pending in
TLS buffers. */
tv.tv_sec = 0;
tv.tv_usec = 0;
@@ -1792,8 +1793,9 @@ thread_main_connection_upgrade (struct MHD_Connection
*con)
urh_update_pollfd (urh, p);
- if ( (con->tls_read_ready) &&
- (urh->in_buffer_used < urh->in_buffer_size))
+ if (((con->tls_read_ready) &&
+ (urh->in_buffer_used < urh->in_buffer_size)) ||
+ (daemon->shutdown))
timeout = 0; /* No need to wait if incoming data is already
pending in TLS buffers. */
else
timeout = -1;
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.