]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mpm_event: avoid possible KeepAlveTimeout off by -100 ms.
authorGraham Leggett <minfrin@apache.org>
Sat, 22 Feb 2020 00:21:52 +0000 (00:21 +0000)
committerGraham Leggett <minfrin@apache.org>
Sat, 22 Feb 2020 00:21:52 +0000 (00:21 +0000)
trunk patch: http://svn.apache.org/r1874277
2.4.x patch: svn merge -c 1874277 ^/httpd/httpd/trunk .

+1: ylavic, covener, minfrin

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1874350 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
server/mpm/event/event.c

diff --git a/CHANGES b/CHANGES
index a053a15d670857296c7db7a9c585fe98c732e301..ecc62313443834b121a079cd280bc1ba0c0c0b04 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.4.42
 
+  *) mpm_event: avoid possible KeepAlveTimeout off by -100 ms.
+     [Eric Covener, Yann Ylavic]
+
   *) Add a config layout for OpenWRT. [Graham Leggett]
 
   *) Add support for cross compiling to apxs. If apxs is being executed from somewhere
diff --git a/STATUS b/STATUS
index 774ee91dc7cb39bb4c2d09958c43fa297fc19d4c..2d10d232b32e81badf9dbc87a5064a30d4edb3f1 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -132,11 +132,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  *) mpm_event: avoid possible KeepAlveTimeout off by -100 ms.
-     trunk patch: http://svn.apache.org/r1874277
-     2.4.x patch: svn merge -c 1874277 ^/httpd/httpd/trunk .
-     +1: ylavic, covener, minfrin
-
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
index 61a9b073bcbaeabd80d2bd105d5473936c24c38c..1cba5d406af2509c12f5714a3bfab355efa7c1ac 100644 (file)
@@ -1523,7 +1523,8 @@ static void process_timeout_queue(struct timeout_queue *q,
                  */
                 apr_time_t q_expiry = cs->queue_timestamp + qp->timeout;
                 apr_time_t next_expiry = queues_next_expiry;
-                if (!next_expiry || next_expiry > q_expiry) {
+                if (!next_expiry
+                        || next_expiry > q_expiry + TIMEOUT_FUDGE_FACTOR) {
                     queues_next_expiry = q_expiry;
                 }
                 break;
@@ -1884,8 +1885,6 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t * thd, void *dummy)
          * with and without wake-ability.
          */
         if (timeout_time && timeout_time < (now = apr_time_now())) {
-            timeout_time = now + TIMEOUT_FUDGE_FACTOR;
-
             /* handle timed out sockets */
             apr_thread_mutex_lock(timeout_mutex);
 
@@ -1897,16 +1896,16 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t * thd, void *dummy)
                 process_keepalive_queue(0); /* kill'em all \m/ */
             }
             else {
-                process_keepalive_queue(timeout_time);
+                process_keepalive_queue(now);
             }
             /* Step 2: write completion timeouts */
-            process_timeout_queue(write_completion_q, timeout_time,
+            process_timeout_queue(write_completion_q, now,
                                   start_lingering_close_nonblocking);
             /* Step 3: (normal) lingering close completion timeouts */
-            process_timeout_queue(linger_q, timeout_time,
+            process_timeout_queue(linger_q, now,
                                   stop_lingering_close);
             /* Step 4: (short) lingering close completion timeouts */
-            process_timeout_queue(short_linger_q, timeout_time,
+            process_timeout_queue(short_linger_q, now,
                                   stop_lingering_close);
 
             apr_thread_mutex_unlock(timeout_mutex);