Fix issue with rapid series of errors on socket.

Mainly changed so any errors on the socket will cause it to be closed
immediately (instead of waiting 10ms or so).