From 4751c3aa1fefe2570e0e1696e22a9c05f66f13c5 Mon Sep 17 00:00:00 2001 From: Jean-Frederic Clere Date: Mon, 11 Jun 2007 12:40:37 +0000 Subject: [PATCH] Arrange the proxy timeout behaviour. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@546128 13f79535-47bb-0310-9956-ffa450edef68 --- modules/proxy/proxy_util.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index 6fe94ea770..45eef5a8cf 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -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, ¤t_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; } -- 2.40.0