You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by li...@apache.org on 2020/04/01 14:48:35 UTC

[dubbo] branch master updated: Fix a redundant judgment code (#5909)

This is an automated email from the ASF dual-hosted git repository.

liujun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/master by this push:
     new 5312f5f  Fix a redundant judgment code (#5909)
5312f5f is described below

commit 5312f5f58e5212733612c5dc79cf98bd99da2a2c
Author: 徐凌峰 <84...@qq.com>
AuthorDate: Wed Apr 1 22:48:20 2020 +0800

    Fix a redundant judgment code (#5909)
---
 .../apache/dubbo/rpc/cluster/loadbalance/LeastActiveLoadBalance.java   | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/loadbalance/LeastActiveLoadBalance.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/loadbalance/LeastActiveLoadBalance.java
index f9283fb..6b1ac64 100644
--- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/loadbalance/LeastActiveLoadBalance.java
+++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/loadbalance/LeastActiveLoadBalance.java
@@ -86,8 +86,7 @@ public class LeastActiveLoadBalance extends AbstractLoadBalance {
                 // Accumulate the total weight of the least active invoker
                 totalWeight += afterWarmup;
                 // If every invoker has the same weight?
-                if (sameWeight && i > 0
-                        && afterWarmup != firstWeight) {
+                if (sameWeight && afterWarmup != firstWeight) {
                     sameWeight = false;
                 }
             }