End connection if reading from socket fails.

Fixes error message:
"Socket operation failed: Connection reset by peer (SOCKET_ECONNRESET)"