Use asyncio.run to create new event loop

This commit is contained in:
dmunozv04
2025-04-06 16:13:29 +02:00
committed by David
parent 724b88a2ba
commit c3f28f7cd1

View File

@@ -181,11 +181,8 @@ async def main_async(config, debug):
finally:
await web_session.close()
await tcp_connector.close()
loop.close()
print("Exited")
def main(config, debug):
loop = asyncio.get_event_loop()
loop.run_until_complete(main_async(config, debug))
loop.close()
asyncio.run(main_async(config, debug))