mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
mod_proxy: follow up to r1750392.
Avoid double checking the connection in ap_proxy_connect_backend() when ap_proxy_check_backend() says it is up and good to go. This can be done by moving the PROXY_WORKER_IS_USABLE() check in ap_proxy_check_backend(), since it is called by ap_proxy_connect_backend(), and not calling the latter if the former succeeded (for the modules using it). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1750474 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -2069,8 +2069,9 @@ static int proxy_http_handler(request_rec *r, proxy_worker *worker,
|
||||
}
|
||||
|
||||
/* Step Two: Make the Connection */
|
||||
ap_proxy_check_backend(proxy_function, backend, r->server, 1);
|
||||
if (ap_proxy_connect_backend(proxy_function, backend, worker, r->server)) {
|
||||
if (ap_proxy_check_backend(proxy_function, backend, r->server, 1) &&
|
||||
ap_proxy_connect_backend(proxy_function, backend, worker,
|
||||
r->server)) {
|
||||
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01114)
|
||||
"HTTP: failed to make connection to backend: %s",
|
||||
backend->hostname);
|
||||
|
Reference in New Issue
Block a user