Fix error recovery and transport events caused by WebSocket.