You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: shield cleanup operations from cancel scope conflicts
Apply CancelScope(shield=True) to prevent RuntimeError when cleaning up
HTTP MCP clients. This fixes the 'Attempted to exit cancel scope in a
different task' error that occurs with asyncio.
Changes:
- session.py: Add _closing flag, shield cleanup in _receive_loop
- streamable_http.py: Shield terminate_session and stream cleanup
Related to: modelcontextprotocol#577
Based on: modelcontextprotocol#1817
0 commit comments