mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 19:56:51 +08:00
Fix: use difference dialer
This commit is contained in:
parent
e5284cf647
commit
65f4a35e7f
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user