]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1889936 from trunk:
authorEric Covener <covener@apache.org>
Mon, 9 Jan 2023 13:28:33 +0000 (13:28 +0000)
committerEric Covener <covener@apache.org>
Mon, 9 Jan 2023 13:28:33 +0000 (13:28 +0000)
    mod_proxy_hcheck: Honor worker timeout settings.

    Daniel reported on user@ that hc connections do not timeout according to
    the worker's tumeout= configuration, this fixes it.

    While at it, copy the other timeout settings too.

    Reported by: dferradal

Submitted By: rpluem
Reviewed By: rpluem, jorton, jim

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

STATUS
changes-entries/hc_timeouts.txt [new file with mode: 0644]
modules/proxy/mod_proxy_hcheck.c

diff --git a/STATUS b/STATUS
index 555776edace988e4f4d921dad3a7e5e60a46e132..c07c192ea5def6968696ef03535cd749418c6419 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -160,14 +160,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
      +1: manu, covener, gbechis
      covener: xml needs doc tweak after backport
 
-  *) mod_proxy_hcheck: Honor worker timeout settings
-     Trunk version of patch:
-        https://svn.apache.org/r1889936
-     Backport version for 2.4.x of patch:
-      Trunk version of patch works
-      svn merge -c 1889936 ^/httpd/httpd/trunk .
-     +1: rpluem, jorton, jim
-
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
 
diff --git a/changes-entries/hc_timeouts.txt b/changes-entries/hc_timeouts.txt
new file mode 100644 (file)
index 0000000..50992bf
--- /dev/null
@@ -0,0 +1 @@
+  *) mod_proxy_hcheck: Honor worker timeout settings.  [Yann Ylavic]
\ No newline at end of file
index 753a709d95e6c32fb9993dccb1412bec8aede83c..d618b4dfb69e8e3214f596daeca54aca4d8b97d9 100644 (file)
@@ -512,10 +512,12 @@ static proxy_worker *hc_get_hcworker(sctx_t *ctx, proxy_worker *worker,
         hc->hash.fnv = hc->s->hash.fnv = ap_proxy_hashfunc(hc->s->name_ex,
                                                            PROXY_HASHFUNC_FNV);
         hc->s->port = port;
-        if (worker->s->conn_timeout_set) {
-            hc->s->conn_timeout_set = worker->s->conn_timeout_set;
-            hc->s->conn_timeout = worker->s->conn_timeout;
-        }
+        hc->s->conn_timeout_set = worker->s->conn_timeout_set;
+        hc->s->conn_timeout = worker->s->conn_timeout;
+        hc->s->ping_timeout_set = worker->s->ping_timeout_set;
+        hc->s->ping_timeout = worker->s->ping_timeout;
+        hc->s->timeout_set = worker->s->timeout_set;
+        hc->s->timeout = worker->s->timeout;
         /* Do not disable worker in case of errors */
         hc->s->status |= PROXY_WORKER_IGNORE_ERRORS;
         /* Mark as the "generic" worker */