From fe3ad3724c512654c09ebe9e18c6881a1613f87d Mon Sep 17 00:00:00 2001 From: Skyxim Date: Thu, 21 Jul 2022 09:02:58 +0800 Subject: [PATCH] fix: resolver error handling exception --- component/resolver/resolver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/component/resolver/resolver.go b/component/resolver/resolver.go index 38412562..23725c7c 100644 --- a/component/resolver/resolver.go +++ b/component/resolver/resolver.go @@ -55,7 +55,7 @@ func ResolveIPv4WithResolver(host string, r Resolver) (netip.Addr, error) { if ips, err := ResolveAllIPv4WithResolver(host, r); err == nil { return ips[rand.Intn(len(ips))], nil } else { - return netip.Addr{}, nil + return netip.Addr{}, err } }