fix(mcp): use module-level time so test patches do not race background sleepers

This commit is contained in:
teknium1
2026-05-17 13:33:16 -07:00
committed by Teknium
parent bdc2113b5c
commit 04b4f765cc
2 changed files with 3 additions and 4 deletions

View File

@@ -3518,7 +3518,6 @@ def _kill_orphaned_mcp_children(include_active: bool = False) -> None:
sessions can still be in flight.
"""
import signal as _signal
import time as _time
with _lock:
pids: Dict[int, str] = {}
@@ -3543,7 +3542,7 @@ def _kill_orphaned_mcp_children(include_active: bool = False) -> None:
pass
# Phase 2: Wait for graceful exit
_time.sleep(2)
time.sleep(2)
# Phase 3: SIGKILL any survivors
_sigkill = getattr(_signal, "SIGKILL", _signal.SIGTERM)