Add workaround for RuntimeError after program finishes on Windows

This commit is contained in:
Joscha 2021-05-25 16:34:18 +00:00
parent 263780e6a3
commit 30be4e29fa

View File

@ -118,7 +118,10 @@ def main() -> None:
sys.exit(1) sys.exit(1)
try: try:
asyncio.run(pferd.run()) loop = asyncio.get_event_loop()
loop.run_until_complete(pferd.run())
loop.run_until_complete(asyncio.sleep(1))
loop.close()
except ConfigOptionError as e: except ConfigOptionError as e:
log.unlock() log.unlock()
log.error(str(e)) log.error(str(e))