Do not ignore ReadPrefixed() errors
This commit is contained in:
parent
887f6ac299
commit
9b5948d697
|
@ -297,6 +297,9 @@ func (proxy *Proxy) exchangeWithTCPServer(serverInfo *ServerInfo, sharedKey *[32
|
||||||
pc.Write(encryptedQuery)
|
pc.Write(encryptedQuery)
|
||||||
encryptedResponse, err := ReadPrefixed(&pc)
|
encryptedResponse, err := ReadPrefixed(&pc)
|
||||||
pc.Close()
|
pc.Close()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
return proxy.Decrypt(serverInfo, sharedKey, encryptedResponse, clientNonce)
|
return proxy.Decrypt(serverInfo, sharedKey, encryptedResponse, clientNonce)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue