From 14f8db0a32f8ba060a0e32b856b5bc849f95141c Mon Sep 17 00:00:00 2001 From: vvzvlad Date: Mon, 16 Mar 2026 04:05:39 +0300 Subject: [PATCH] refactor(client): add optional session param to _on_disconnect --- telegram_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telegram_client.py b/telegram_client.py index 5d700d8..757f1e7 100644 --- a/telegram_client.py +++ b/telegram_client.py @@ -50,7 +50,7 @@ class TelegramClient: self.client.add_handler(DisconnectHandler(self._on_disconnect)) logger.info("connection_handlers: connection handlers set up") - async def _on_disconnect(self, _client): + async def _on_disconnect(self, _client, _session=None): """Handles disconnection from Telegram servers""" self.disconnect_count += 1 logger.warning(f"connection_handler: connection lost (#{self.disconnect_count})")