commit | 665b9fd2e2b4d414cc37bbce3f77ed0c9140b1c0 | [log] [tgz] |
---|---|---|
author | Igor Sysoev <igor@sysoev.ru> | Mon Feb 11 14:31:38 2008 +0000 |
committer | Igor Sysoev <igor@sysoev.ru> | Mon Feb 11 14:31:38 2008 +0000 |
tree | 43364e0797c47cdfa04ea145ad18eca870216848 | |
parent | c2e854e1988c20bbcdae928765035264c74c2ad9 [diff] [blame] |
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 79747f6..c25c076 100644 --- a/src/http/ngx_http_upstream_round_robin.c +++ b/src/http/ngx_http_upstream_round_robin.c
@@ -605,7 +605,7 @@ } for (i = 0; i < peers->number; i++) { - peer[i].current_weight += peer[i].weight; + peer[i].current_weight = peer[i].weight; } } }