diff src/http/ngx_http_upstream_round_robin.c @ 1465:a9132739bb57

balance more fair when there are several servers with equal weights, side effect: now smallest weights go first
author Igor Sysoev <igor@sysoev.ru>
date Sun, 09 Sep 2007 18:23:21 +0000
parents 1f6898bb813e
children 56f1ea5baabb
line wrap: on
line diff
--- a/src/http/ngx_http_upstream_round_robin.c
+++ b/src/http/ngx_http_upstream_round_robin.c
@@ -498,7 +498,7 @@ ngx_http_upstream_get_peer(ngx_http_upst
                 }
 
                 if (peer[n].current_weight * 1000 / peer[i].current_weight
-                    >= peer[n].weight * 1000 / peer[i].weight)
+                    > peer[n].weight * 1000 / peer[i].weight)
                 {
                     return n;
                 }