Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2007-10-15 14:15:54 +0400
committerIgor Sysoev <igor@sysoev.ru>2007-10-15 14:15:54 +0400
commitab18bf2f0234b4dbf497d6b4bbf9b1f1f411cc8b (patch)
tree75c41b7d313d09a2e7fb4fe8d886d7a264730c82
parent2517eef67b91616c419b7b13eb4d0d9f4e8aa472 (diff)
use real weight, do not downground to one
-rw-r--r--src/http/ngx_http_upstream_round_robin.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/http/ngx_http_upstream_round_robin.c b/src/http/ngx_http_upstream_round_robin.c
index 6b612b67a..0b3a70915 100644
--- a/src/http/ngx_http_upstream_round_robin.c
+++ b/src/http/ngx_http_upstream_round_robin.c
@@ -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;
}
}
}