From: Jean-Frederic Clere Date: Mon, 25 Jun 2007 14:29:54 +0000 (+0000) Subject: Fix the timeout logic. The order is now: X-Git-Tag: 2.3.0~1758 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=55bb4fbe30201e654484e8682da954e5f8ec839c;p=apache Fix the timeout logic. The order is now: 1 - worker->timeout 2 - proxy_conf->timeout 3 - server->timeout. ap_get_module_config() is not perfect by that is easy to port back to 2.2.x. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@550514 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index 45eef5a8cf..8aace3b59e 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -2167,6 +2167,9 @@ PROXY_DECLARE(int) ap_proxy_connect_backend(const char *proxy_function, int loglevel; apr_sockaddr_t *backend_addr = conn->addr; apr_socket_t *newsock; + void *sconf = s->module_config; + proxy_server_conf *conf = + (proxy_server_conf *) ap_get_module_config(sconf, &proxy_module); if (conn->sock) { /* @@ -2215,6 +2218,9 @@ PROXY_DECLARE(int) ap_proxy_connect_backend(const char *proxy_function, if (worker->timeout_set == 1) { apr_socket_timeout_set(newsock, worker->timeout); } + else if (conf->timeout_set == 1) { + apr_socket_timeout_set(newsock, conf->timeout); + } else { apr_socket_timeout_set(newsock, s->timeout); }