Klaus Demo nginx / ab18bf2
use real weight, do not downground to one Igor Sysoev 14 years ago
1 changed file(s) with 1 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
510510 }
511511
512512 for (i = 0; i < peers->number; i++) {
513 if (peer[i].max_fails == 0 || peer[i].fails < peer[i].max_fails) {
514 peer[i].current_weight += peer[i].weight;
515
516 } else {
517 /* 1 allows to go to quick recovery when all peers failed */
518 peer[i].current_weight = 1;
519 }
513 peer[i].current_weight += peer[i].weight;
520514 }
521515 }
522516 }