Error handling when TCP connections fail
This commit is contained in:
parent
86de4be519
commit
a1c8012fc6
|
@ -282,6 +282,9 @@ func (proxy *Proxy) exchangeWithTCPServer(serverInfo *ServerInfo, sharedKey *[32
|
|||
} else {
|
||||
pc, err = (*proxyDialer).Dial("tcp", serverInfo.TCPAddr.String())
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
pc.SetDeadline(time.Now().Add(serverInfo.Timeout))
|
||||
encryptedQuery, err = PrefixWithSize(encryptedQuery)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue