mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-06-03 06:07:20 +02:00
🔥 origins already checked before getRandomUpstreamByWeight
This commit is contained in:
parent
d64b1174af
commit
97ff48ee70
@ -106,9 +106,6 @@ func getRandomUpstreamByWeight(upstreams []*Upstream) (*Upstream, int, error) {
|
||||
if totalUpstreams == 1 {
|
||||
return upstreams[0], 0, nil
|
||||
}
|
||||
if totalUpstreams == 0 {
|
||||
return nil, -1, errors.New("no upstream servers available")
|
||||
}
|
||||
|
||||
totalWeight := 0
|
||||
fallbackUpstreams := make([]*Upstream, 0) // List of upstreams with weight 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user