Replaced all message queue calls and updated peer writer
The socket will now be closed if a peer fails to connect for whatever
reason