From 2390a21479553e2b42e06eb10049d5c09ab9ef0a Mon Sep 17 00:00:00 2001 From: v4rgas <66626747+v4rgas@users.noreply.github.com> Date: Fri, 28 Feb 2025 09:54:58 -0300 Subject: [PATCH] fix race codnition in process termination --- src/multilspy/lsp_protocol_handler/server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/multilspy/lsp_protocol_handler/server.py b/src/multilspy/lsp_protocol_handler/server.py index 865c2f0..e697e63 100644 --- a/src/multilspy/lsp_protocol_handler/server.py +++ b/src/multilspy/lsp_protocol_handler/server.py @@ -240,10 +240,10 @@ async def stop(self) -> None: try: await asyncio.wait_for(wait_for_end, timeout=60) except asyncio.TimeoutError: - process.kill() - for child in psutil.Process(process.pid).children(recursive=True): child.kill() + + process.kill() async def shutdown(self) -> None: