[vlc-devel] [PATCH 1/4] httpd: update activity time before processing timeout

Thomas Guillem thomas at gllm.fr
Wed Oct 28 13:34:34 CET 2020


From: Francois Cartegnie <git at videolan.org>

---
 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 52c8e5bdf3e..13feb383a14 100644
--- a/src/network/httpd.c
+++ b/src/network/httpd.c
@@ -1743,6 +1743,11 @@ static void httpdLoop(httpd_host_t *host)
                 break;
         }
 
+        if (val == 0) {
+            cl->i_activity_date = now;
+            delay = 0;
+        }
+
         if (cl->i_state == HTTPD_CLIENT_DEAD
          || (cl->i_activity_timeout > 0
           && cl->i_activity_date + cl->i_activity_timeout < now)) {
@@ -1751,11 +1756,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 + ARRAY_SIZE (ufd));
 
-- 
2.28.0



More information about the vlc-devel mailing list