RUnlock for early exit (#2127)
This commit is contained in:
parent
6916c047e1
commit
0a0b69d93d
|
@ -338,6 +338,7 @@ func findFarthestRoute(proxy *Proxy, name string, relayStamps []stamps.ServerSta
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if serverIdx < 0 {
|
if serverIdx < 0 {
|
||||||
|
proxy.serversInfo.RUnlock()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
server := proxy.serversInfo.registeredServers[serverIdx]
|
server := proxy.serversInfo.registeredServers[serverIdx]
|
||||||
|
|
Loading…
Reference in New Issue