Fixes issues #49 - Make sure only do socket.send when connected

Closes #49