mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-01-04 01:19:46 +01:00
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
Block a user