]> granicus.if.org Git - apache/commitdiff
Arrange the proxy timeout behaviour.
authorJean-Frederic Clere <jfclere@apache.org>
Mon, 11 Jun 2007 12:40:37 +0000 (12:40 +0000)
committerJean-Frederic Clere <jfclere@apache.org>
Mon, 11 Jun 2007 12:40:37 +0000 (12:40 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@546128 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/proxy_util.c

index 6fe94ea7708e87621862dcb61a4a6de6079a8bd0..45eef5a8cf140acff2eddeb32c1fa94381632f7c 100644 (file)
@@ -2278,6 +2278,7 @@ PROXY_DECLARE(int) ap_proxy_connection_create(const char *proxy_function,
 {
     apr_sockaddr_t *backend_addr = conn->addr;
     int rc;
+    apr_interval_time_t current_timeout;
 
     /*
      * The socket is now open, create a new backend server connection
@@ -2327,6 +2328,12 @@ PROXY_DECLARE(int) ap_proxy_connection_create(const char *proxy_function,
                  "proxy: %s: connection complete to %pI (%s)",
                  proxy_function, backend_addr, conn->hostname);
 
+    /*
+     * save the timout of the socket because core_pre_connection
+     * will set it to base_server->timeout
+     * (core TimeOut directive).
+     */
+    apr_socket_timeout_get(conn->sock, &current_timeout);
     /* set up the connection filters */
     rc = ap_run_pre_connection(conn->connection, conn->sock);
     if (rc != OK && rc != DONE) {
@@ -2336,6 +2343,7 @@ PROXY_DECLARE(int) ap_proxy_connection_create(const char *proxy_function,
                      proxy_function, rc);
         return rc;
     }
+    apr_socket_timeout_set(conn->sock, current_timeout);
 
     return OK;
 }