diff --git a/pyrogram/connection/transport/tcp/tcp.py b/pyrogram/connection/transport/tcp/tcp.py index 17fdcba6..a8fca46c 100644 --- a/pyrogram/connection/transport/tcp/tcp.py +++ b/pyrogram/connection/transport/tcp/tcp.py @@ -32,6 +32,10 @@ class TCP(socket.socket): def recv(self, *args): pass + def close(self): + self.shutdown(socket.SHUT_RDWR) + super().close() + def recvall(self, length: int) -> bytes or None: data = b""