Merge pull request #288 from dmunozv04/create_event_loop

Use asyncio.run to create new event loop
This commit is contained in:
David
2025-04-12 20:02:47 +02:00
committed by GitHub

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))