mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
close web-session on app close
This commit is contained in:
parent
3ba724e2fa
commit
a7711cc2e0
9 changed files with 37 additions and 2 deletions
|
|
@ -52,6 +52,9 @@ async def main() -> None:
|
|||
# And the run events dispatching
|
||||
await dp.start_polling(bot)
|
||||
|
||||
# Don't forget to close web-session on your app close
|
||||
await bot.session.close()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
logging.basicConfig(level=logging.INFO, stream=sys.stdout)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue