comparison src/http/ngx_http_upstream_round_robin.c @ 1462:93a70a330e21

backout r1426: return dynamic weights
author Igor Sysoev <igor@sysoev.ru>
date Wed, 05 Sep 2007 15:28:19 +0000
parents f8142ab2bace
children 1f6898bb813e
comparison
equal deleted inserted replaced
1461:7d5580345205 1462:93a70a330e21
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[i].fails == 0) { 517 if (peer[i].fails == 0) {
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;
523 } 523 }