From f724347ddd2cc63fae6176d1e4ed283f5e16bccb Mon Sep 17 00:00:00 2001 From: rvck Date: Wed, 6 Aug 2025 22:57:42 +0700 Subject: [PATCH] Update tcp.py --- pyrogram/connection/transport/tcp/tcp.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pyrogram/connection/transport/tcp/tcp.py b/pyrogram/connection/transport/tcp/tcp.py index 3b7b0944..380d6064 100644 --- a/pyrogram/connection/transport/tcp/tcp.py +++ b/pyrogram/connection/transport/tcp/tcp.py @@ -213,9 +213,7 @@ class SOCKS4Handler: writer: asyncio.StreamWriter, reader: asyncio.StreamReader, destination: Tuple[str, int], - *, - username: Optional[str] = None, - timeout: int = 10, + username: Optional[str] = None ) -> None: """Perform SOCKS4 handshake.""" host, port = destination @@ -224,7 +222,7 @@ class SOCKS4Handler: writer.write(request) await writer.drain() - response = await asyncio.wait_for(reader.read(8), timeout) + response = await asyncio.wait_for(reader.read(8), 10) if len(response) != 8 or response[0] != 0x00 or response[1] != 0x5A: raise ConnectionError("SOCKS4 connection failed")