From ca189e1b67b4b06f74fdc4f47f36d46ed7b876aa Mon Sep 17 00:00:00 2001 From: CleverThis Date: Fri, 15 May 2026 03:51:56 +0000 Subject: [PATCH] fix(lsp): restore explicit _process cleanup in OSError handler PR branch HEAD was using try-except-pass around stop() without an explicit self._process = None assignment in the OSError exception handler. This corrected it to match master and the FileNotFoundError pattern: direct stop() followed by explicit _process = None. Closes #10597 --- src/cleveragents/lsp/transport.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/cleveragents/lsp/transport.py b/src/cleveragents/lsp/transport.py index bab01a497..8c634d192 100644 --- a/src/cleveragents/lsp/transport.py +++ b/src/cleveragents/lsp/transport.py @@ -128,10 +128,8 @@ class StdioTransport: # raised (e.g. exec in a child fails), so we must terminate # and wait to avoid leaking a zombie or orphan. if self._process is not None: - try: - self.stop() - except Exception: # noqa: BLE001 -- best-effort cleanup - pass + self.stop() + self._process = None from cleveragents.lsp.errors import LspError