Chore: adjust dial tcp timeout

This commit is contained in:
Dreamacro
2018-10-22 21:14:22 +08:00
parent 4895bcefca
commit 082d3bbf04
5 changed files with 8 additions and 4 deletions

View File

@ -46,7 +46,7 @@ func (ss *Socks5) Type() C.AdapterType {
}
func (ss *Socks5) Generator(metadata *C.Metadata) (adapter C.ProxyAdapter, err error) {
c, err := net.Dial("tcp", ss.addr)
c, err := net.DialTimeout("tcp", ss.addr, tcpTimeout)
if err != nil {
return nil, fmt.Errorf("%s connect error", ss.addr)
}