mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-12 18:19:34 +00:00
More graceful stopping of long polling.
This commit is contained in:
parent
62d5dda84d
commit
16a61b092f
3 changed files with 39 additions and 20 deletions
|
|
@ -34,6 +34,7 @@ async def _shutdown(dispatcher: Dispatcher, callback=None):
|
|||
|
||||
if dispatcher.is_polling():
|
||||
dispatcher.stop_polling()
|
||||
await dispatcher.wait_closed()
|
||||
|
||||
await dispatcher.storage.close()
|
||||
await dispatcher.storage.wait_closed()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue