Check readyState for closing prior WebSocket connections