mirror of
https://github.com/dmunozv04/iSponsorBlockTV.git
synced 2025-12-06 03:46:44 +03:00
Merge pull request #288 from dmunozv04/create_event_loop
Use asyncio.run to create new event loop
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user