mirror of
https://github.com/dmunozv04/iSponsorBlockTV.git
synced 2025-12-09 13:26: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:
|
finally:
|
||||||
await web_session.close()
|
await web_session.close()
|
||||||
await tcp_connector.close()
|
await tcp_connector.close()
|
||||||
loop.close()
|
|
||||||
print("Exited")
|
print("Exited")
|
||||||
|
|
||||||
|
|
||||||
def main(config, debug):
|
def main(config, debug):
|
||||||
loop = asyncio.get_event_loop()
|
asyncio.run(main_async(config, debug))
|
||||||
loop.run_until_complete(main_async(config, debug))
|
|
||||||
loop.close()
|
|
||||||
|
|||||||
Reference in New Issue
Block a user