From: Stefan Eissing Date: Fri, 30 Jun 2023 09:08:23 +0000 (+0000) Subject: proxy: in proxy tunnels, use the smaller timeout value of X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e86ee5f549ad12747af8f5b46526c6eb59ecaf09;p=thirdparty%2Fapache%2Fhttpd.git 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 --- diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index 750714560f0..1d705f98283 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");