Fix peer connection issue

Fixes:
 1. Peer client emitting to the logs that it connected to a peer multiple times when it reconnects.
 2. Bug with peer_socket that was keeping the socket in a connected state but the ws connection was actually disconnected.
 3. Added a timeout to the confirm connection http request that is sent before a peer connection is fully established.