fix(mcp): preserve loop during probes

This commit is contained in:
helix4u
2026-06-14 02:09:45 -07:00
committed by Teknium
parent 85e6232a07
commit 4936a49a0c
4 changed files with 48 additions and 6 deletions
+2 -2
View File
@@ -212,7 +212,7 @@ def _probe_single_server(
_ensure_mcp_loop,
_run_on_mcp_loop,
_connect_server,
_stop_mcp_loop,
_stop_mcp_loop_if_idle,
)
config = _resolve_mcp_server_config(config)
@@ -240,7 +240,7 @@ def _probe_single_server(
except BaseException as exc:
raise _unwrap_exception_group(exc) from None
finally:
_stop_mcp_loop()
_stop_mcp_loop_if_idle()
return tools_found