Skip to content

Commit 8c42202

Browse files
committed
Handle ProcessLookupError in win32.py to ensure process termination
Signed-off-by: DanielAvdar <66269169+DanielAvdar@users.noreply.github.com>
1 parent 606a499 commit 8c42202

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/mcp/client/stdio/win32.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,6 @@ async def terminate_windows_process(process: Process):
107107
except TimeoutError:
108108
# Force kill if it doesn't terminate
109109
process.kill()
110+
except ProcessLookupError:
111+
# Force kill if it doesn't terminate
112+
process.kill()

0 commit comments

Comments
 (0)