Fix: use difference dialer

This commit is contained in:
gVisor bot 2019-10-23 12:35:41 +08:00
parent 78494f2560
commit 51404fa8e8

View file

@ -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 {