summaryrefslogtreecommitdiffstats
path: root/modules/proxy/mod_proxy_balancer.c
diff options
context:
space:
mode:
authorJim Jagielski <jim@apache.org>2006-12-08 22:37:08 +0100
committerJim Jagielski <jim@apache.org>2006-12-08 22:37:08 +0100
commit3b5d5bf319e5fa964735412f63d5d6a8f964e0cd (patch)
treef9e3b1642bf8c696a15a452e9d728075e3c2c77e /modules/proxy/mod_proxy_balancer.c
parentWe are doing nothing here... but keep the stubs (diff)
downloadapache2-3b5d5bf319e5fa964735412f63d5d6a8f964e0cd.tar.xz
apache2-3b5d5bf319e5fa964735412f63d5d6a8f964e0cd.zip
Failure to unlock is very nasty, so log it to help
with troubleshooting. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@484792 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--modules/proxy/mod_proxy_balancer.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/modules/proxy/mod_proxy_balancer.c b/modules/proxy/mod_proxy_balancer.c
index ebcce2e693..529fa1a201 100644
--- a/modules/proxy/mod_proxy_balancer.c
+++ b/modules/proxy/mod_proxy_balancer.c
@@ -305,7 +305,10 @@ static proxy_worker *find_best_worker(proxy_balancer *balancer,
return NULL;
*/
- PROXY_THREAD_UNLOCK(balancer);
+ if ((rv = PROXY_THREAD_UNLOCK(balancer)) != APR_SUCCESS) {
+ ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
+ "proxy: BALANCER: (%s). Unlock failed for find_best_worker()", balancer->name);
+ }
if (candidate == NULL) {
/* All the workers are in error state or disabled.
@@ -458,11 +461,19 @@ static int proxy_balancer_pre_request(proxy_worker **worker,
ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
"proxy: BALANCER: (%s). All workers are in error state for route (%s)",
(*balancer)->name, route);
- PROXY_THREAD_UNLOCK(*balancer);
+ if ((rv = PROXY_THREAD_UNLOCK(*balancer)) != APR_SUCCESS) {
+ ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
+ "proxy: BALANCER: (%s). Unlock failed for pre_request",
+ (*balancer)->name);
+ }
return HTTP_SERVICE_UNAVAILABLE;
}
- PROXY_THREAD_UNLOCK(*balancer);
+ if ((rv = PROXY_THREAD_UNLOCK(*balancer)) != APR_SUCCESS) {
+ ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
+ "proxy: BALANCER: (%s). Unlock failed for pre_request",
+ (*balancer)->name);
+ }
if (!*worker) {
runtime = find_best_worker(*balancer, r);
if (!runtime) {
@@ -535,7 +546,11 @@ static int proxy_balancer_post_request(proxy_worker *worker,
/* TODO: placeholder for post_request actions
*/
- PROXY_THREAD_UNLOCK(balancer);
+ if ((rv = PROXY_THREAD_UNLOCK(balancer)) != APR_SUCCESS) {
+ ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
+ "proxy: BALANCER: (%s). Unlock failed for post_request",
+ balancer->name);
+ }
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
"proxy_balancer_post_request for (%s)", balancer->name);