mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 11:42:43 +08:00
chore: update
This commit is contained in:
parent
8df44a7c3d
commit
72ab200faf
|
@ -197,8 +197,6 @@ func dualStackDialContext(
|
|||
preferIPv4 bool) (net.Conn, error) {
|
||||
fallbackTimer := time.NewTimer(fallbackTimeout)
|
||||
defer fallbackTimer.Stop()
|
||||
fallbackCtx, fallbackCancel := context.WithCancel(ctx)
|
||||
defer fallbackCancel()
|
||||
results := make(chan dialResult)
|
||||
returned := make(chan struct{})
|
||||
defer close(returned)
|
||||
|
@ -213,7 +211,7 @@ func dualStackDialContext(
|
|||
}
|
||||
}
|
||||
}()
|
||||
result.Conn, result.error = dial(fallbackCtx)
|
||||
result.Conn, result.error = dial(ctx)
|
||||
}
|
||||
go racer(ipv4DialFn, preferIPv4)
|
||||
go racer(ipv6DialFn, !preferIPv4)
|
||||
|
|
Loading…
Reference in New Issue
Block a user