mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2025-05-25 19:38:07 +08:00
Fix: resolve ip crash
This commit is contained in:
parent
794bbb87da
commit
57176b410d
@ -131,12 +131,14 @@ func (r *Resolver) resolveIP(m *D.Msg) (msg *D.Msg, err error) {
|
|||||||
return nil, errors.New("GeoIP can't use")
|
return nil, errors.New("GeoIP can't use")
|
||||||
}
|
}
|
||||||
|
|
||||||
ips, _ := r.msgToIP(res.Msg)
|
ips, err := r.msgToIP(res.Msg)
|
||||||
|
if err == nil {
|
||||||
if record, _ := mmdb.Country(ips[0]); record.Country.IsoCode == "CN" || record.Country.IsoCode == "" {
|
if record, _ := mmdb.Country(ips[0]); record.Country.IsoCode == "CN" || record.Country.IsoCode == "" {
|
||||||
// release channel
|
// release channel
|
||||||
go func() { <-fallbackMsg }()
|
go func() { <-fallbackMsg }()
|
||||||
msg = res.Msg
|
msg = res.Msg
|
||||||
return
|
return msg, err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user