mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-02-20 23:47:21 -05:00
fix selectLeastLoad() returns wrong number of nodes (#2083)
This commit is contained in:
parent
0cd219fdc5
commit
f9422d60aa
@ -118,8 +118,8 @@ func (l *LeastLoadStrategy) selectLeastLoad(nodes []*node) []*node {
|
||||
// go through all base line until find expected selects
|
||||
for _, b := range l.settings.Baselines {
|
||||
baseline := time.Duration(b)
|
||||
for i := 0; i < availableCount; i++ {
|
||||
if nodes[i].RTTDeviationCost > baseline {
|
||||
for i := count; i < availableCount; i++ {
|
||||
if nodes[i].RTTDeviationCost >= baseline {
|
||||
break
|
||||
}
|
||||
count = i + 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user