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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user