mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-03-04 02:14:40 +01:00
Error handling when TCP connections fail
This commit is contained in:
parent
86de4be519
commit
a1c8012fc6
1 changed files with 3 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue