mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-16 12:07:13 +00:00
Merge remote-tracking branch 'origin/dev' into dev
# Conflicts: # aiogram/bot.py
This commit is contained in:
commit
ab7934f333
1 changed files with 2 additions and 4 deletions
|
|
@ -1,5 +1,4 @@
|
|||
import asyncio
|
||||
import signal
|
||||
|
||||
import aiohttp
|
||||
|
||||
|
|
@ -10,6 +9,7 @@ from .api import ApiMethods
|
|||
from .types.chat import Chat
|
||||
from .types.update import Update
|
||||
from .types.user import User
|
||||
from .utils.payload import generate_payload
|
||||
|
||||
|
||||
class AIOGramBot:
|
||||
|
|
@ -30,9 +30,7 @@ class AIOGramBot:
|
|||
connector=aiohttp.TCPConnector(limit=connections_limit),
|
||||
loop=self.loop)
|
||||
|
||||
self.loop.add_signal_handler(signal.SIGINT, self._on_exit)
|
||||
|
||||
def _on_exit(self):
|
||||
def __del__(self):
|
||||
self.session.close()
|
||||
|
||||
def prepare_object(self, obj):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue