From 734fd39d065aa1fd46c93e0b15aa8121ad310e01 Mon Sep 17 00:00:00 2001 From: Lillard <443450050@qq.com> Date: Wed, 2 May 2018 15:18:31 +0800 Subject: [PATCH] Fix issues #375 --- .../java/com/netflix/loadbalancer/WeightedResponseTimeRule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ribbon-loadbalancer/src/main/java/com/netflix/loadbalancer/WeightedResponseTimeRule.java b/ribbon-loadbalancer/src/main/java/com/netflix/loadbalancer/WeightedResponseTimeRule.java index b71cfaf3..d69eb3da 100644 --- a/ribbon-loadbalancer/src/main/java/com/netflix/loadbalancer/WeightedResponseTimeRule.java +++ b/ribbon-loadbalancer/src/main/java/com/netflix/loadbalancer/WeightedResponseTimeRule.java @@ -194,7 +194,7 @@ public Server choose(ILoadBalancer lb, Object key) { // pick the server index based on the randomIndex int n = 0; for (Double d : currentWeights) { - if (d >= randomWeight) { + if (d > randomWeight) { serverIndex = n; break; } else {