changeset 1887:abbef7b5dab8

set absolute weight, this fixes bogus "no live upstream" case when last upstream is down while live one has negative weight
author Igor Sysoev <igor@sysoev.ru>
date Mon, 11 Feb 2008 14:31:38 +0000
parents 2819956d1ca0
children 07ad5b260661
files src/http/ngx_http_upstream_round_robin.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;
         }
     }
 }