Be more hostile with sockets that write block. Fixes #449