From ab18bf2f0234b4dbf497d6b4bbf9b1f1f411cc8b Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Mon, 15 Oct 2007 10:15:54 +0000 Subject: use real weight, do not downground to one --- src/http/ngx_http_upstream_round_robin.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src') diff --git a/src/http/ngx_http_upstream_round_robin.c b/src/http/ngx_http_upstream_round_robin.c index 6b612b67a..0b3a70915 100644 --- a/src/http/ngx_http_upstream_round_robin.c +++ b/src/http/ngx_http_upstream_round_robin.c @@ -511,13 +511,7 @@ ngx_http_upstream_get_peer(ngx_http_upstream_rr_peers_t *peers) } for (i = 0; i < peers->number; i++) { - if (peer[i].max_fails == 0 || peer[i].fails < peer[i].max_fails) { - peer[i].current_weight += peer[i].weight; - - } else { - /* 1 allows to go to quick recovery when all peers failed */ - peer[i].current_weight = 1; - } + peer[i].current_weight += peer[i].weight; } } } -- cgit