Mercurial > hg > nginx
comparison src/http/ngx_http_upstream_round_robin.c @ 1568:771c4071f5f6
use real weight, do not downground to one
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 15 Oct 2007 10:15:54 +0000 |
parents | 6725c3f56216 |
children | 13f8dec720b5 |
comparison
equal
deleted
inserted
replaced
1567:31d4278d51c0 | 1568:771c4071f5f6 |
---|---|
509 | 509 |
510 return n; | 510 return n; |
511 } | 511 } |
512 | 512 |
513 for (i = 0; i < peers->number; i++) { | 513 for (i = 0; i < peers->number; i++) { |
514 if (peer[i].max_fails == 0 || peer[i].fails < peer[i].max_fails) { | 514 peer[i].current_weight += peer[i].weight; |
515 peer[i].current_weight += peer[i].weight; | |
516 | |
517 } else { | |
518 /* 1 allows to go to quick recovery when all peers failed */ | |
519 peer[i].current_weight = 1; | |
520 } | |
521 } | 515 } |
522 } | 516 } |
523 } | 517 } |
524 | 518 |
525 | 519 |