dns: SetDeadline for all remote connection

This commit is contained in:
nadoo committed 2018-10-20 21:24:11 +08:00
1 parent 515a5dffa5
commit 14b072832d
4 files changed
+6 -5

No files matched your search

+3 -1
View File
@@ -208,7 +208,9 @@ func (c *Conn) DecodeRespHeader() error {
stream := cipher.NewCFBDecrypter(block, c.respBodyIV[:])
buf := make([]byte, 4)
io.ReadFull(c.Conn, buf)
if _, err := io.ReadFull(c.Conn, buf); err != nil {
return err
}
stream.XORKeyStream(buf, buf)
if buf[0] != c.reqRespV {