mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Close bots sessions after emit_shutdown
This commit is contained in:
parent
42cba8976f
commit
8b9972f1ed
1 changed files with 2 additions and 2 deletions
|
|
@ -393,10 +393,10 @@ class Dispatcher(Router):
|
|||
)
|
||||
await asyncio.gather(*coro_list)
|
||||
finally:
|
||||
for bot in bots: # Close sessions
|
||||
await bot.session.close()
|
||||
loggers.dispatcher.info("Polling stopped")
|
||||
await self.emit_shutdown(**workflow_data)
|
||||
for bot in bots: # Close sessions
|
||||
await bot.session.close()
|
||||
|
||||
def run_polling(
|
||||
self,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue