[vlc-devel] [PATCH] httpd: update activity time before processing timeout (#25151)

Francois Cartegnie fcvlcdev at free.fr
Mon Sep 28 18:39:32 CEST 2020


as connection state handling block has moved in
67cdaeea58641d6d515728596f8b194f52538e2b
sockets can now timeout when still active.
---
 src/network/httpd.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/network/httpd.c b/src/network/httpd.c
index 3197fb2ec9..d9c19c2c29 100644
--- a/src/network/httpd.c
+++ b/src/network/httpd.c
@@ -1730,6 +1730,11 @@ static void httpdLoop(httpd_host_t *host)
                 break;
         }
 
+        if (val == 0) {
+            cl->i_activity_date = now;
+            delay = 0;
+        }
+
         if (cl->i_ref < 0 || (cl->i_ref == 0 &&
                     (cl->i_state == HTTPD_CLIENT_DEAD ||
                       (cl->i_activity_timeout > 0 &&
@@ -1740,11 +1745,6 @@ static void httpdLoop(httpd_host_t *host)
             continue;
         }
 
-        if (val == 0) {
-            cl->i_activity_date = now;
-            delay = 0;
-        }
-
         struct pollfd *pufd = ufd + nfd;
         assert (pufd < ufd + (sizeof (ufd) / sizeof (ufd[0])));
 
-- 
2.25.4



More information about the vlc-devel mailing list