Fix: use difference dialer
This commit is contained in:
parent
78494f2560
commit
51404fa8e8
1 changed files with 1 additions and 2 deletions
|
@ -93,8 +93,6 @@ func dialContext(ctx context.Context, network, address string) (net.Conn, error)
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
dialer := net.Dialer{}
|
|
||||||
|
|
||||||
returned := make(chan struct{})
|
returned := make(chan struct{})
|
||||||
defer close(returned)
|
defer close(returned)
|
||||||
|
|
||||||
|
@ -109,6 +107,7 @@ func dialContext(ctx context.Context, network, address string) (net.Conn, error)
|
||||||
var primary, fallback dialResult
|
var primary, fallback dialResult
|
||||||
|
|
||||||
startRacer := func(ctx context.Context, host string, ipv6 bool) {
|
startRacer := func(ctx context.Context, host string, ipv6 bool) {
|
||||||
|
dialer := net.Dialer{}
|
||||||
result := dialResult{ipv6: ipv6, done: true}
|
result := dialResult{ipv6: ipv6, done: true}
|
||||||
defer func() {
|
defer func() {
|
||||||
select {
|
select {
|
||||||
|
|
Loading…
Reference in a new issue