1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-07 04:02:58 +03:00

* Add the possibility to set a separate connection timeout for backend

workers.

PR: 45445
Submitted by: rahul <rahul sun.com>
Reviewed by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@684341 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ruediger Pluem
2008-08-09 20:52:46 +00:00
parent 91d5801b05
commit b4e20c8e55
6 changed files with 42 additions and 3 deletions

View File

@@ -2325,8 +2325,11 @@ PROXY_DECLARE(int) ap_proxy_connect_backend(const char *proxy_function,
"Failed to set");
}
/* Set a timeout on the socket */
if (worker->timeout_set == 1) {
/* Set a timeout for connecting to the backend on the socket */
if (worker->conn_timeout_set) {
apr_socket_timeout_set(newsock, worker->conn_timeout);
}
else if (worker->timeout_set == 1) {
apr_socket_timeout_set(newsock, worker->timeout);
}
else if (conf->timeout_set == 1) {
@@ -2364,6 +2367,17 @@ PROXY_DECLARE(int) ap_proxy_connect_backend(const char *proxy_function,
continue;
}
/* Set a timeout on the socket */
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);
}
conn->sock = newsock;
connected = 1;
}