GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Description: The fair load balancer module for nginx
Homepage: http://nginx.localdomain.pl
Clone URL: git://github.com/gnosek/nginx-upstream-fair.git
Silly logic bug in idle/no_rr mode checking

Yay for De Morgan's laws.
gnosek (author)
Sun Oct 12 08:51:16 -0700 2008
commit  dc897c042014999694a0bcdbfa0a1b58adb84df6
tree    b2f16d471fba0c5b4ae3d131c8587e9d31fa6e13
parent  8fac71e7fa02ad84b155e0c2e3f6c383ac950ba0
...
762
763
764
765
 
766
767
768
...
762
763
764
 
765
766
767
768
0
@@ -762,7 +762,7 @@ ngx_http_upstream_choose_fair_peer_idle(ngx_peer_connection_t *pc,
0
         }
0
 
0
         /* not in WM_IDLE+no_rr mode: the first completely idle backend gets chosen */
0
- if (weight_mode != WM_IDLE && !fp->peers->no_rr) {
0
+ if (weight_mode != WM_IDLE || !fp->peers->no_rr) {
0
             best_idx = n;
0
             break;
0
         }

Comments

    No one has commented yet.