]> granicus.if.org Git - apache/commitdiff
Fix the timeout logic. The order is now:
authorJean-Frederic Clere <jfclere@apache.org>
Mon, 25 Jun 2007 14:29:54 +0000 (14:29 +0000)
committerJean-Frederic Clere <jfclere@apache.org>
Mon, 25 Jun 2007 14:29:54 +0000 (14:29 +0000)
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

index 45eef5a8cf140acff2eddeb32c1fa94381632f7c..8aace3b59eebdba1ac8e6e746d4c5b747e328955 100644 (file)
@@ -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);
         }