From 85a6ee67c66d00d828b605826800e0b6874ed126 Mon Sep 17 00:00:00 2001 From: Jim Jagielski Date: Mon, 20 Jul 2009 18:53:08 +0000 Subject: [PATCH] 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 --- modules/proxy/mod_proxy_balancer.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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; } -- 2.40.0