fix(exec): retain stale sessions after cleanup failure

Only remove idle exec sessions after process termination succeeds so later cleanup and shutdown paths can retry failed kills.
This commit is contained in:
KDB authored and chengyongru committed 2026-07-23 23:55:00 +08:00
1 parent 274613f064
commit 648fc92673
2 files changed
+26 -1

No files matched your search

+2 -1
View File
@@ -370,8 +370,9 @@ class ExecSessionManager:
if now - session.last_access > self.idle_timeout
]
for session_id in stale:
session = self._sessions.pop(session_id)
session = self._sessions[session_id]
await session.kill()
self._sessions.pop(session_id, None)
async def _spawn(
self,