# HG changeset patch # User Igor Sysoev # Date 1202740298 0 # Node ID abbef7b5dab87ec0b41491d704a21ce972468b56 # Parent 2819956d1ca03742ce5d69fbf3a246412e38199e set absolute weight, this fixes bogus "no live upstream" case when last upstream is down while live one has negative weight 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 @@ -605,7 +605,7 @@ ngx_http_upstream_get_peer(ngx_http_upst } for (i = 0; i < peers->number; i++) { - peer[i].current_weight += peer[i].weight; + peer[i].current_weight = peer[i].weight; } } }