Bug fix

- Don't disconnect a socket that was never connected
- Fix message ordering