From a78ac41a1c6d9ca5f4172999a9b438ab065bf63a Mon Sep 17 00:00:00 2001 From: CCLCK <84182037+CCLCK@users.noreply.github.com> Date: Sat, 11 Apr 2026 19:21:35 +0800 Subject: [PATCH] Add dedicated evolution MCP idle timeout --- openspace/evolution_mcp_server.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/openspace/evolution_mcp_server.py b/openspace/evolution_mcp_server.py index 8d38625..fe7a6c1 100644 --- a/openspace/evolution_mcp_server.py +++ b/openspace/evolution_mcp_server.py @@ -162,12 +162,18 @@ def _maybe_start_idle_watchdog() -> None: if _idle_watchdog_started: return - timeout_raw = os.environ.get("OPENSPACE_MCP_IDLE_TIMEOUT_SECONDS", "").strip() + timeout_raw = os.environ.get("OPENSPACE_EVOLUTION_MCP_IDLE_TIMEOUT_SECONDS", "").strip() + if not timeout_raw: + timeout_raw = os.environ.get("OPENSPACE_MCP_IDLE_TIMEOUT_SECONDS", "").strip() if timeout_raw: try: idle_timeout_seconds = int(timeout_raw) except ValueError: - logger.warning("Invalid OPENSPACE_MCP_IDLE_TIMEOUT_SECONDS=%r", timeout_raw) + logger.warning( + "Invalid evolution MCP idle timeout value=%r " + "(from OPENSPACE_EVOLUTION_MCP_IDLE_TIMEOUT_SECONDS or OPENSPACE_MCP_IDLE_TIMEOUT_SECONDS)", + timeout_raw, + ) return else: idle_timeout_seconds = 900