From 1d3cc36eefba842f30356e16ad6637b6ae002cf6 Mon Sep 17 00:00:00 2001 From: Skyxim Date: Sat, 19 Nov 2022 10:50:13 +0800 Subject: [PATCH] chore: return context error --- component/dialer/dialer.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/component/dialer/dialer.go b/component/dialer/dialer.go index 4a6982ba..42a037f9 100644 --- a/component/dialer/dialer.go +++ b/component/dialer/dialer.go @@ -331,6 +331,10 @@ func concurrentDialContext(ctx context.Context, network string, ips []netip.Addr return nil, fallback.error } + if ctx.Err() != nil { + return nil, ctx.Err() + } + return nil, fmt.Errorf("all ips %v tcp shake hands failed", ips) }