Skip to content

Commit 6d3d2f7

Browse files
committed
force os._exit(0) after successful run to prevent event loop spin
1 parent e628977 commit 6d3d2f7

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • src/seclab_taskflow_agent

src/seclab_taskflow_agent/cli.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,10 @@ def main(
160160
),
161161
debug=debug,
162162
)
163+
# Force-exit on success to prevent asyncio event loop spin on
164+
# dangling connections/tasks that survive cleanup.
165+
import os
166+
os._exit(0)
163167
except KeyboardInterrupt:
164168
typer.echo("\nInterrupted.", err=True)
165169
raise typer.Exit(code=130)

0 commit comments

Comments
 (0)