Commit 0badd8fd authored by Shane Kerr's avatar Shane Kerr

Partial fix: prevents infinite loop if client closes connection.

Full fix needs to be to do partial reads on TCP connections.


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1540 e5f2f494-b856-4b98-b285-d166d9295462
parent dbfdd073
......@@ -516,8 +516,15 @@ processMessageTCP(const int fd, Message& dns_message,
if (cc0 < 0) {
if (verbose_mode) {
cerr << "TCP receive error" << endl;
close(ts);
return;
}
}
if (cc0 == 0) {
// client closed connection
close(ts);
return;
}
cc += cc0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment