changed reconnect default setting to false (it was getting into bad states). Instead, check state of connection before write() and reconnect on demand. NOTE: socket.connect() is async. there might be a race condition here."