Close bots sessions after emit_shutdown

This commit is contained in:
darksidecat 2021-10-18 00:27:01 +03:00 committed by GitHub
parent 42cba8976f
commit 8b9972f1ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,