Close the WebSocket connection when a spec fails