refactor(gateway): scope foreground registration

This commit is contained in:
Xubin Ren committed 2026-08-17 20:56:10 +08:00
1 parent 014eab5f6a
commit 19be5be1c0
3 files changed
+36 -25

No files matched your search

+1 -4
View File
@@ -954,8 +954,5 @@ def _run_gateway(
finally:
restore_shutdown_handlers()
gateway_runtime.claim_current_process(gateway_start_options)
try:
with gateway_runtime.foreground_instance(gateway_start_options):
asyncio.run(run())
finally:
gateway_runtime.release_current_process()