mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-08 12:18:54 -05:00
[V3] Clean up shutdown exceptions (#1141)
This commit is contained in:
parent
878d10a1e2
commit
ef7216722f
@ -157,10 +157,9 @@ def main():
|
||||
rpc.clean_up()
|
||||
if cleanup_tasks:
|
||||
pending = asyncio.Task.all_tasks(loop=red.loop)
|
||||
gathered = asyncio.gather(*pending, loop=red.loop)
|
||||
gathered = asyncio.gather(
|
||||
*pending, loop=red.loop, return_exceptions=True)
|
||||
gathered.cancel()
|
||||
red.loop.run_until_complete(gathered)
|
||||
gathered.exception()
|
||||
|
||||
sys.exit(red._shutdown_mode.value)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user