From f8d93813e9885a4c5d9cb003a17211b7a2871ab8 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 12 Jan 2023 10:52:26 +0800 Subject: [PATCH] aqctl_corelog: fix asyncio loop management --- artiq/frontend/aqctl_corelog.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/artiq/frontend/aqctl_corelog.py b/artiq/frontend/aqctl_corelog.py index 8c766ecf5..c5f5a8eee 100755 --- a/artiq/frontend/aqctl_corelog.py +++ b/artiq/frontend/aqctl_corelog.py @@ -96,14 +96,15 @@ def main(): signal_handler.setup() try: get_logs_task = asyncio.ensure_future( - get_logs_sim(args.core_addr) if args.simulation else get_logs(args.core_addr)) + get_logs_sim(args.core_addr) if args.simulation else get_logs(args.core_addr), + loop=loop) try: server = Server({"corelog": PingTarget()}, None, True) loop.run_until_complete(server.start(common_args.bind_address_from_args(args), args.port)) try: _, pending = loop.run_until_complete(asyncio.wait( - [signal_handler.wait_terminate(), - server.wait_terminate(), + [loop.create_task(signal_handler.wait_terminate()), + loop.create_task(server.wait_terminate()), get_logs_task], return_when=asyncio.FIRST_COMPLETED)) for task in pending: