Quellcode durchsuchen

Fixed reset of timeout timer on resumed connections.

Evgeny Grin (Karlson2k) vor 9 Jahren
Ursprung
Commit
0a0533358b
1 geänderte Dateien mit 4 neuen und 0 gelöschten Zeilen
  1. 4 0
      src/microhttpd/daemon.c

+ 4 - 0
src/microhttpd/daemon.c

@@ -2860,6 +2860,10 @@ resume_suspended_connections (struct MHD_Daemon *daemon)
                       pos);
           if (0 == (daemon->options & MHD_USE_THREAD_PER_CONNECTION))
             {
+              /* Reset timeout timer on resume. */
+              if (0 != pos->connection_timeout)
+                pos->last_activity = MHD_monotonic_sec_counter();
+
               if (pos->connection_timeout == daemon->connection_timeout)
                 XDLL_insert (daemon->normal_timeout_head,
                              daemon->normal_timeout_tail,