mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-06-04 22:57: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 {
|
if totalUpstreams == 1 {
|
||||||
return upstreams[0], 0, nil
|
return upstreams[0], 0, nil
|
||||||
}
|
}
|
||||||
if totalUpstreams == 0 {
|
|
||||||
return nil, -1, errors.New("no upstream servers available")
|
|
||||||
}
|
|
||||||
|
|
||||||
totalWeight := 0
|
totalWeight := 0
|
||||||
fallbackUpstreams := make([]*Upstream, 0) // List of upstreams with weight 0
|
fallbackUpstreams := make([]*Upstream, 0) // List of upstreams with weight 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user