aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/bot.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/bot/bot.py b/bot/bot.py
index 5e05d1596..2f366a3ef 100644
--- a/bot/bot.py
+++ b/bot/bot.py
@@ -106,9 +106,8 @@ class Bot(commands.Bot):
self.remove_extensions()
# Wait until all tasks that have to be completed before bot is closing is done
- for task in self.closing_tasks:
- log.trace(f"Waiting for task {task.get_name()} before closing.")
- await task
+ log.trace("Waiting for tasks before closing.")
+ await asyncio.gather(*self.closing_tasks)
# Now actually do full close of bot
await super(commands.Bot, self).close()