Fixes #21 - Use WebSocketEventListener to detect WebSocket disconnection