summaryrefslogtreecommitdiffstats
path: root/modules/proxy
diff options
context:
space:
mode:
authorStefan Eissing <icing@apache.org>2023-06-30 11:08:23 +0200
committerStefan Eissing <icing@apache.org>2023-06-30 11:08:23 +0200
commite86ee5f549ad12747af8f5b46526c6eb59ecaf09 (patch)
tree78230624b9099a70e19f16c35318d9d329058c46 /modules/proxy
parenttests: another sync of the http2 tests (diff)
downloadapache2-e86ee5f549ad12747af8f5b46526c6eb59ecaf09.tar.xz
apache2-e86ee5f549ad12747af8f5b46526c6eb59ecaf09.zip
proxy: in proxy tunnels, use the smaller timeout value of
client and origin as timeout for polling the tunnel. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1910704 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/proxy')
-rw-r--r--modules/proxy/proxy_util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c
index 750714560f..1d705f9828 100644
--- a/modules/proxy/proxy_util.c
+++ b/modules/proxy/proxy_util.c
@@ -4921,9 +4921,9 @@ PROXY_DECLARE(apr_status_t) ap_proxy_tunnel_create(proxy_tunnel_rec **ptunnel,
apr_socket_timeout_get(tunnel->origin->pfd->desc.s, &origin_timeout);
apr_socket_opt_set(tunnel->origin->pfd->desc.s, APR_SO_NONBLOCK, 1);
- /* Defaults to the biggest timeout of both connections */
- tunnel->timeout = (origin_timeout >= 0 && origin_timeout > client_timeout)?
- origin_timeout : client_timeout;
+ /* Defaults to the smallest timeout of both connections */
+ tunnel->timeout = (client_timeout >= 0 && client_timeout < origin_timeout ?
+ client_timeout : origin_timeout);
/* Bidirectional non-HTTP stream will confuse mod_reqtimeoout */
ap_remove_input_filter_byhandle(c_i->input_filters, "reqtimeout");