Mercurial > hg > nginx-quic
comparison src/http/ngx_http_upstream_round_robin.c @ 1551:9ea31a2eab27
fix r1464: test max fails in correct peer
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 01 Oct 2007 14:45:31 +0000 |
parents | 56f1ea5baabb |
children | 3dc408adbb70 |
comparison
equal
deleted
inserted
replaced
1550:d0bdd5f2276e | 1551:9ea31a2eab27 |
---|---|
512 | 512 |
513 return n; | 513 return n; |
514 } | 514 } |
515 | 515 |
516 for (i = 0; i < peers->number; i++) { | 516 for (i = 0; i < peers->number; i++) { |
517 if (peer->max_fails == 0 || peer->fails < peer->max_fails) { | 517 if (peer[i].max_fails == 0 || peer[i].fails < peer->max_fails) { |
518 peer[i].current_weight += peer[i].weight; | 518 peer[i].current_weight += peer[i].weight; |
519 | 519 |
520 } else { | 520 } else { |
521 /* 1 allows to go to quick recovery when all peers failed */ | 521 /* 1 allows to go to quick recovery when all peers failed */ |
522 peer[i].current_weight = 1; | 522 peer[i].current_weight = 1; |