]> git.kaiwu.me - nginx.git/commitdiff
use real weight, do not downground to one
authorIgor Sysoev <igor@sysoev.ru>
Mon, 15 Oct 2007 10:15:54 +0000 (10:15 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Mon, 15 Oct 2007 10:15:54 +0000 (10:15 +0000)
src/http/ngx_http_upstream_round_robin.c

index 6b612b67ae90f4240fd5697f55da0ded89801c78..0b3a7091545a9d94453a0781431385f60271eaf5 100644 (file)
@@ -511,13 +511,7 @@ ngx_http_upstream_get_peer(ngx_http_upstream_rr_peers_t *peers)
         }
 
         for (i = 0; i < peers->number; i++) {
-            if (peer[i].max_fails == 0 || peer[i].fails < peer[i].max_fails) {
-                peer[i].current_weight += peer[i].weight;
-
-            } else {
-                /* 1 allows to go to quick recovery when all peers failed */
-                peer[i].current_weight = 1;
-            }
+            peer[i].current_weight += peer[i].weight;
         }
     }
 }