From 36e7d8b13bd39b60f316c701a987121ddc38724f Mon Sep 17 00:00:00 2001 From: rick <156548662+rpt0@users.noreply.github.com> Date: Mon, 11 Aug 2025 13:27:36 +0700 Subject: [PATCH] Update tcp.py --- pyrogram/connection/transport/tcp/tcp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrogram/connection/transport/tcp/tcp.py b/pyrogram/connection/transport/tcp/tcp.py index 908353a6..a16f27ab 100644 --- a/pyrogram/connection/transport/tcp/tcp.py +++ b/pyrogram/connection/transport/tcp/tcp.py @@ -121,7 +121,7 @@ class TCP: async def connect(self, address: Tuple[str, int]) -> None: try: await asyncio.wait_for(self._connect(address), TCP.TIMEOUT) - except asyncio.TimeoutError: # re raise as TimeoutError. asyncio.TimeoutError is deprecated in 3.11 + except asyncio.TimeoutError: raise TimeoutError("Connection timed out") async def close(self) -> None: