fix: resolver error handling exception

This commit is contained in:
gVisor bot 2022-07-21 09:02:58 +08:00
parent 093525ec17
commit 9201e7a43a

View file

@ -55,7 +55,7 @@ func ResolveIPv4WithResolver(host string, r Resolver) (netip.Addr, error) {
if ips, err := ResolveAllIPv4WithResolver(host, r); err == nil { if ips, err := ResolveAllIPv4WithResolver(host, r); err == nil {
return ips[rand.Intn(len(ips))], nil return ips[rand.Intn(len(ips))], nil
} else { } else {
return netip.Addr{}, nil return netip.Addr{}, err
} }
} }