]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 2808: getRoundRobinParent not handling weights correctly
authorAmos Jeffries <amosjeffries@squid-cache.org>
Mon, 25 Oct 2010 06:38:54 +0000 (00:38 -0600)
committerAmos Jeffries <amosjeffries@squid-cache.org>
Mon, 25 Oct 2010 06:38:54 +0000 (00:38 -0600)
Suspected fix. Has not been able to be replicated before the change.

src/neighbors.cc

index f3239ba8a461e7342bc2d600fbb3975b8f15cfdb..e5ea243f6c7c926c572c3bde84834d22ff2a7efd 100644 (file)
@@ -320,7 +320,7 @@ getRoundRobinParent(HttpRequest * request)
             if (p->weight == q->weight) {
                 if (q->rr_count < p->rr_count)
                     continue;
-            } else if ( (double) q->rr_count / q->weight < (double) p->rr_count / p->weight) {
+            } else if ( ((double) q->rr_count / q->weight) < ((double) p->rr_count / p->weight)) {
                 continue;
             }
         }