We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8df221e + 250fc10 commit 9c8bbd9Copy full SHA for 9c8bbd9
1 file changed
src/seclab_taskflow_agent/runner.py
@@ -462,6 +462,9 @@ async def deploy_task_agents(
462
continue
463
except Exception:
464
logging.exception("Exception in mcp server cleanup task")
465
+ # Yield to give mcp_session_task a chance to finish after being
466
+ # signalled, especially when there are no servers to clean up.
467
+ await asyncio.sleep(0)
468
# If the MCP session task is still running (e.g. all servers were
469
# already disconnected and the cleanup loop above never entered)
470
# cancel it explicitly so a dangling task can't keep the event
0 commit comments