use real weight, do not downground to one

This commit is contained in:
Igor Sysoev 2007-10-15 10:15:54 +00:00
parent 531115412f
commit ad8723ae80

View file

@ -511,13 +511,7 @@ ngx_http_upstream_get_peer(ngx_http_upstream_rr_peers_t *peers)
} }
for (i = 0; i < peers->number; i++) { 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; peer[i].current_weight += peer[i].weight;
} else {
/* 1 allows to go to quick recovery when all peers failed */
peer[i].current_weight = 1;
}
} }
} }
} }