]> git.kaiwu.me - nginx.git/commitdiff
backout r1426: return dynamic weights
authorIgor Sysoev <igor@sysoev.ru>
Wed, 5 Sep 2007 15:28:19 +0000 (15:28 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Wed, 5 Sep 2007 15:28:19 +0000 (15:28 +0000)
src/http/ngx_http_upstream_round_robin.c

index 441a1aaab00780c99760e8520ecf38b1896aacbc..106d6450e3c3cf92019765ce2f092005b5150a9e 100644 (file)
@@ -515,7 +515,7 @@ ngx_http_upstream_get_peer(ngx_http_upstream_rr_peers_t *peers)
 
         for (i = 0; i < peers->number; i++) {
             if (peer[i].fails == 0) {
-                peer[i].current_weight = peer[i].weight;
+                peer[i].current_weight += peer[i].weight;
 
             } else {
                 /* 1 allows to go to quick recovery when all peers failed */