]> granicus.if.org Git - apache/commitdiff
In the case where we have no members, they aren't in error
authorJim Jagielski <jim@apache.org>
Mon, 20 Jul 2009 18:53:08 +0000 (18:53 +0000)
committerJim Jagielski <jim@apache.org>
Mon, 20 Jul 2009 18:53:08 +0000 (18:53 +0000)
states :)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@795954 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/mod_proxy_balancer.c

index 1238bb3d844eadc8a9c5bf2b972ebaae80315a6b..cc918ac2fd2b59382a6880e49834e5e334e0b1be 100644 (file)
@@ -532,9 +532,15 @@ static int proxy_balancer_pre_request(proxy_worker **worker,
     if (!*worker) {
         runtime = find_best_worker(*balancer, r);
         if (!runtime) {
-            ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
-                         "proxy: BALANCER: (%s). All workers are in error state",
-                         (*balancer)->name);
+            if ((*balancer)->workers->nelts) {
+                ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
+                            "proxy: BALANCER: (%s). All workers are in error state",
+                            (*balancer)->name);
+            } else {
+                ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
+                            "proxy: BALANCER: (%s). No workers in balancer",
+                            (*balancer)->name);
+            }
 
             return HTTP_SERVICE_UNAVAILABLE;
         }