Clean up WebSocket invocation