Fix #161 - send throws an exception if the socket is closed
Merge pull request #162 from trevorbernard/closed-socket-crash

Fix #161 - send throws an exception if the socket is closed