gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [libmicrohttpd] branch master updated: Fixed logic of idle


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] branch master updated: Fixed logic of idle disconnection: connection should be disconnected not early than "timeout", not before "timeout" number of seconds.
Date: Thu, 16 Mar 2017 21:16:23 +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 88fee01b Fixed logic of idle disconnection: connection should be 
disconnected not early than "timeout", not before "timeout" number of seconds.
88fee01b is described below

commit 88fee01b55e7b49026fbbdcbb4d890e90cd3b743
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Thu Mar 16 23:14:35 2017 +0300

    Fixed logic of idle disconnection: connection should be disconnected not 
early than "timeout",
    not before "timeout" number of seconds.
---
 ChangeLog                         | 4 ++++
 src/microhttpd/connection.c       | 2 +-
 src/microhttpd/connection_https.c | 2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 08814edb..c7406a63 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Mar 16 23:12:07 MSK 2017
+       Idle connection should be disconnected *after* "timeout" number of
+       second, not *before* this number. -EG/VT
+
 Thu Mar 16 22:31:54 MSK 2017
        Unified update of last activity on connections.
        Update last activity only if something is really transmitted.
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index a883e4d9..2b1c35da 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -3219,7 +3219,7 @@ MHD_connection_handle_idle (struct MHD_Connection 
*connection)
       unsigned int timeout;
       timeout = connection->connection_timeout;
       if ( (0 != timeout) &&
-           (timeout <= (MHD_monotonic_sec_counter() - 
connection->last_activity)) )
+           (timeout < (MHD_monotonic_sec_counter() - 
connection->last_activity)) )
         {
           MHD_connection_close_ (connection,
                                  MHD_REQUEST_TERMINATED_TIMEOUT_REACHED);
diff --git a/src/microhttpd/connection_https.c 
b/src/microhttpd/connection_https.c
index 2c5e2588..fe197f1d 100644
--- a/src/microhttpd/connection_https.c
+++ b/src/microhttpd/connection_https.c
@@ -155,7 +155,7 @@ MHD_tls_connection_handle_idle (struct MHD_Connection 
*connection)
     }
   timeout = connection->connection_timeout;
   if ( (timeout != 0) &&
-       (timeout <= (MHD_monotonic_sec_counter() - connection->last_activity)))
+       (timeout < (MHD_monotonic_sec_counter() - connection->last_activity)))
     MHD_connection_close_ (connection,
                            MHD_REQUEST_TERMINATED_TIMEOUT_REACHED);
 #ifdef EPOLL_SUPPORT

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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