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
mcp: fix context propagation in StreamableClientTransport
Context propagation was broken in StreamableClientTransport because:
1. Connect() used context.Background() instead of the parent context
2. Close() created a race condition where DELETE requests were cancelled
This change fixes both issues by:
- Using the parent context when creating the connection context
- Reordering Close() to perform cleanup DELETE before cancelling context
This ensures request-scoped values (auth tokens, trace IDs) propagate
correctly to background HTTP operations.
Fixes#513
0 commit comments