diff options
author | Igor Sysoev <igor@sysoev.ru> | 2007-09-05 15:30:19 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2007-09-05 15:30:19 +0000 |
commit | 7a697747211cb70579ad5a3d9fbad71b87c11793 (patch) | |
tree | bda6f9badeda03d94d6e62e5dbd42cf39ba63896 /src | |
parent | 4efa705cc0bb62d77d847d7b22846971eddb6a8f (diff) | |
download | nginx-7a697747211cb70579ad5a3d9fbad71b87c11793.tar.gz nginx-7a697747211cb70579ad5a3d9fbad71b87c11793.zip |
fix case when server was marked as down after one failure
Diffstat (limited to 'src')
-rw-r--r-- | src/http/ngx_http_upstream_round_robin.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/http/ngx_http_upstream_round_robin.c b/src/http/ngx_http_upstream_round_robin.c index 106d6450e..4f017f922 100644 --- a/src/http/ngx_http_upstream_round_robin.c +++ b/src/http/ngx_http_upstream_round_robin.c @@ -514,7 +514,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) { + if (peer->max_fails == 0 || peer->fails < peer->max_fails) { peer[i].current_weight += peer[i].weight; } else { |