]> git.kaiwu.me - nginx.git/commitdiff
cancel dynamic weights,
authorIgor Sysoev <igor@sysoev.ru>
Mon, 27 Aug 2007 16:02:43 +0000 (16:02 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Mon, 27 Aug 2007 16:02:43 +0000 (16:02 +0000)
it seems that may permanently set lower weight or even mark server as down

src/http/ngx_http_upstream_round_robin.c

index 2db99b2ac53bb50b702e7f1b00bc7959ed9214b8..be93ccbf83278691d3a91341c6bed13d471fac6f 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 */