From ab2b9dbfb74049ad207a91c45971948127dde893 Mon Sep 17 00:00:00 2001 From: Yann Ylavic Date: Sun, 16 May 2021 17:04:55 +0000 Subject: [PATCH] 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 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1889936 13f79535-47bb-0310-9956-ffa450edef68 --- changes-entries/hc_timeouts.txt | 1 + modules/proxy/mod_proxy_hcheck.c | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 changes-entries/hc_timeouts.txt diff --git a/changes-entries/hc_timeouts.txt b/changes-entries/hc_timeouts.txt new file mode 100644 index 00000000000..50992bf40ae --- /dev/null +++ b/changes-entries/hc_timeouts.txt @@ -0,0 +1 @@ + *) mod_proxy_hcheck: Honor worker timeout settings. [Yann Ylavic] \ No newline at end of file diff --git a/modules/proxy/mod_proxy_hcheck.c b/modules/proxy/mod_proxy_hcheck.c index b78147beedd..4d91669ba97 100644 --- a/modules/proxy/mod_proxy_hcheck.c +++ b/modules/proxy/mod_proxy_hcheck.c @@ -491,10 +491,12 @@ static proxy_worker *hc_get_hcworker(sctx_t *ctx, proxy_worker *worker, hc->hash.def = hc->s->hash.def = ap_proxy_hashfunc(hc->s->name, PROXY_HASHFUNC_DEFAULT); hc->hash.fnv = hc->s->hash.fnv = ap_proxy_hashfunc(hc->s->name, 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 */ -- 2.47.3