This patch avoid leaving the TCP connection opened when recv() returns 0 bytes (connection closed)
This patch avoid leaving the TCP connection opened
when recv() returns 0 bytes (connection closed)

To reproduce the problem (that could easily lead to a DOS), just open
a tcp connection via telnet, send two chars and then close the connection. The server will
be blocked in the loop.

paulc/dnslib,paulc/dnslib