1
0
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:
Shelikhoo 2025-01-14 20:22:17 +00:00
parent e9b12173dc
commit 3b4ba525df
No known key found for this signature in database
GPG Key ID: 4C9764E9FE80A3DC

View File

@ -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()