From 72ab200faff640aebb9154aa78d45de0f055a442 Mon Sep 17 00:00:00 2001 From: Skyxim Date: Sun, 26 Feb 2023 10:44:23 +0800 Subject: [PATCH] chore: update --- component/dialer/dialer.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/component/dialer/dialer.go b/component/dialer/dialer.go index 1a6c9d43..f7909175 100644 --- a/component/dialer/dialer.go +++ b/component/dialer/dialer.go @@ -197,8 +197,6 @@ func dualStackDialContext( preferIPv4 bool) (net.Conn, error) { fallbackTimer := time.NewTimer(fallbackTimeout) defer fallbackTimer.Stop() - fallbackCtx, fallbackCancel := context.WithCancel(ctx) - defer fallbackCancel() results := make(chan dialResult) returned := make(chan struct{}) defer close(returned) @@ -213,7 +211,7 @@ func dualStackDialContext( } } }() - result.Conn, result.error = dial(fallbackCtx) + result.Conn, result.error = dial(ctx) } go racer(ipv4DialFn, preferIPv4) go racer(ipv6DialFn, !preferIPv4)