Skip to content

Commit 5312f5f

Browse files
Fix a redundant judgment code (#5909)
1 parent 4f286f5 commit 5312f5f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/loadbalance/LeastActiveLoadBalance.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ protected <T> Invoker<T> doSelect(List<Invoker<T>> invokers, URL url, Invocation
8686
// Accumulate the total weight of the least active invoker
8787
totalWeight += afterWarmup;
8888
// If every invoker has the same weight?
89-
if (sameWeight && i > 0
90-
&& afterWarmup != firstWeight) {
89+
if (sameWeight && afterWarmup != firstWeight) {
9190
sameWeight = false;
9291
}
9392
}

0 commit comments

Comments
 (0)