From: Jim Jagielski Date: Mon, 20 Jul 2009 18:53:08 +0000 (+0000) Subject: In the case where we have no members, they aren't in error X-Git-Tag: 2.3.3~420 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=85a6ee67c66d00d828b605826800e0b6874ed126;p=apache In the case where we have no members, they aren't in error states :) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@795954 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/mod_proxy_balancer.c b/modules/proxy/mod_proxy_balancer.c index 1238bb3d84..cc918ac2fd 100644 --- a/modules/proxy/mod_proxy_balancer.c +++ b/modules/proxy/mod_proxy_balancer.c @@ -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; }