From 51404fa8e8dc055ecd4273f308e93a65736b562e Mon Sep 17 00:00:00 2001 From: gVisor bot 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 {