diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2007-10-02 12:34:16 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2007-10-02 12:34:16 +0000 |
| commit | a103646402e0451a1823b1e505780852377323ec (patch) | |
| tree | 1c6392cf3c075ef7c420b40403f07b2f928ebaf0 | |
| parent | d13045f16cb8ad94f666c3a704c552cd3ae13492 (diff) | |
| download | nginx-a103646402e0451a1823b1e505780852377323ec.tar.gz nginx-a103646402e0451a1823b1e505780852377323ec.tar.bz2 | |
fix r1552 and r1464: test max fails in correct peer
| -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 d2a894799..5caf06091 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].max_fails == 0 || peer[i].fails < peer->max_fails) { + if (peer[i].max_fails == 0 || peer[i].fails < peer[i].max_fails) { peer[i].current_weight += peer[i].weight; } else { |
