Emit 'connect' when a connection to the WebSocket is established
Avoid a variable by unregistering the listener