From 65f4a35e7f357efc12180ee2a31c860f04aec39e Mon Sep 17 00:00:00 2001 From: Dreamacro <305009791@qq.com> Date: Wed, 23 Oct 2019 12:35:41 +0800 Subject: [PATCH] Fix: use difference dialer --- adapters/outbound/util.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/adapters/outbound/util.go b/adapters/outbound/util.go index 4fdbe003..3af093c4 100644 --- a/adapters/outbound/util.go +++ b/adapters/outbound/util.go @@ -93,8 +93,6 @@ func dialContext(ctx context.Context, network, address string) (net.Conn, error) return nil, err } - dialer := net.Dialer{} - returned := make(chan struct{}) defer close(returned) @@ -109,6 +107,7 @@ func dialContext(ctx context.Context, network, address string) (net.Conn, error) var primary, fallback dialResult startRacer := func(ctx context.Context, host string, ipv6 bool) { + dialer := net.Dialer{} result := dialResult{ipv6: ipv6, done: true} defer func() { select {