Commit c3dc56a
committed
fix(client): remove manual task cancellation to fix process cleanup
ROOT CAUSE:
Manual tg.cancel_scope.cancel() was interfering with process cleanup in the
async with block, causing CancelledError and ProcessLookupError during
process termination.
CHANGES:
- Removed tg.cancel_scope.cancel() call from finally block
- The async with block already handles task cancellation when exiting
IMPACT:
- Fixes test_stdio_client_sigint_only_process failure
- Process cleanup now completes without interference
- Background tasks still properly cancelled by task group exit
FILES MODIFIED:
- src/mcp/client/stdio.py1 parent 701e4d7 commit c3dc56a
1 file changed
+0
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | 209 | | |
214 | 210 | | |
215 | 211 | | |
| |||
0 commit comments