set absolute weight, this fixes bogus "no live upstream" case when

last upstream is down while live one has negative weight
This commit is contained in:
Igor Sysoev 2008-02-11 14:31:38 +00:00
parent c2e854e198
commit 665b9fd2e2

View File

@ -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;
}
}
}