mirror of
https://github.com/cmz0228/hysteria-dev.git
synced 2025-06-08 05:19:53 +00:00
feat: add a 10 sec timeout to default outbound dialer
This commit is contained in:
parent
1209aa9e11
commit
bacc8ff5ed
@ -117,8 +117,12 @@ type UDPConn interface {
|
||||
|
||||
type defaultOutbound struct{}
|
||||
|
||||
var defaultOutboundDialer = net.Dialer{
|
||||
Timeout: 10 * time.Second,
|
||||
}
|
||||
|
||||
func (o *defaultOutbound) DialTCP(reqAddr string) (net.Conn, error) {
|
||||
return net.Dial("tcp", reqAddr)
|
||||
return defaultOutboundDialer.Dial("tcp", reqAddr)
|
||||
}
|
||||
|
||||
func (o *defaultOutbound) ListenUDP() (UDPConn, error) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user