From 55bb4fbe30201e654484e8682da954e5f8ec839c Mon Sep 17 00:00:00 2001 From: Jean-Frederic Clere Date: Mon, 25 Jun 2007 14:29:54 +0000 Subject: [PATCH] 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 --- modules/proxy/proxy_util.c | 6 ++++++ 1 file changed, 6 insertions(+) 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); } -- 2.40.0