comparison src/http/ngx_http_upstream_round_robin.c @ 1887:abbef7b5dab8

set absolute weight, this fixes bogus "no live upstream" case when last upstream is down while live one has negative weight
author Igor Sysoev <igor@sysoev.ru>
date Mon, 11 Feb 2008 14:31:38 +0000
parents 13f8dec720b5
children cb8c0c8e0c27
comparison
equal deleted inserted replaced
1886:2819956d1ca0 1887:abbef7b5dab8
603 603
604 return n; 604 return n;
605 } 605 }
606 606
607 for (i = 0; i < peers->number; i++) { 607 for (i = 0; i < peers->number; i++) {
608 peer[i].current_weight += peer[i].weight; 608 peer[i].current_weight = peer[i].weight;
609 } 609 }
610 } 610 }
611 } 611 }
612 612
613 613