# HG changeset patch # User Igor Sysoev # Date 1192443354 0 # Node ID 771c4071f5f6784b9f60c36416febee7d46de9aa # Parent 31d4278d51c00def0c9d1b9cdc2879bd5806fb2f use real weight, do not downground to one diff --git a/src/http/ngx_http_upstream_round_robin.c b/src/http/ngx_http_upstream_round_robin.c --- 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_upst } 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; } } }