From: Igor Sysoev Date: Mon, 11 Feb 2008 14:31:38 +0000 (+0000) Subject: set absolute weight, this fixes bogus "no live upstream" case when X-Git-Tag: release-0.6.26~1 X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/postgres_fdw.c?a=commitdiff_plain;h=665b9fd2e2b4d414cc37bbce3f77ed0c9140b1c0;p=nginx.git 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 index 79747f6c4..c25c076b4 100644 --- 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_upstream_rr_peers_t *peers) } for (i = 0; i < peers->number; i++) { - peer[i].current_weight += peer[i].weight; + peer[i].current_weight = peer[i].weight; } } }