Close the tcp socket on Errno::EPIPE.
Merge pull request #30 from bernd/tcpsocket-epipe-fix

Close the tcp socket on Errno::EPIPE