mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-07-26 11:44:22 -04:00
fix crash when observatory is not found
This commit is contained in:
parent
e9b12173dc
commit
3b4ba525df
@ -40,6 +40,11 @@ func (l *LeastPingStrategy) PickOutbound(strings []string) string {
|
||||
}))
|
||||
}
|
||||
|
||||
if l.observatory == nil {
|
||||
newError("cannot find observatory").WriteToLog()
|
||||
return ""
|
||||
}
|
||||
|
||||
observeReport, err := l.observatory.GetObservation(l.ctx)
|
||||
if err != nil {
|
||||
newError("cannot get observe report").Base(err).WriteToLog()
|
||||
|
Loading…
x
Reference in New Issue
Block a user