From: Igor Sysoev Date: Wed, 5 Sep 2007 15:30:19 +0000 (+0000) Subject: fix case when server was marked as down after one failure X-Git-Tag: release-0.6.11~10 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=7a697747211cb70579ad5a3d9fbad71b87c11793;p=nginx.git fix case when server was marked as down after one failure --- diff --git a/src/http/ngx_http_upstream_round_robin.c b/src/http/ngx_http_upstream_round_robin.c index 106d6450e..4f017f922 100644 --- a/src/http/ngx_http_upstream_round_robin.c +++ b/src/http/ngx_http_upstream_round_robin.c @@ -514,7 +514,7 @@ ngx_http_upstream_get_peer(ngx_http_upstream_rr_peers_t *peers) } for (i = 0; i < peers->number; i++) { - if (peer[i].fails == 0) { + if (peer->max_fails == 0 || peer->fails < peer->max_fails) { peer[i].current_weight += peer[i].weight; } else {