diff --git a/pyrogram/session/session.py b/pyrogram/session/session.py index 6225fe44..c1269d49 100644 --- a/pyrogram/session/session.py +++ b/pyrogram/session/session.py @@ -122,8 +122,6 @@ class Session: self.is_connected = Event() def start(self): - terms = None - while True: try: self.connection.connect() @@ -141,7 +139,7 @@ class Session: self.next_salt_thread.start() if not self.is_cdn: - terms = self._send( + self._send( functions.InvokeWithLayer( layer, functions.InitConnection( @@ -150,10 +148,10 @@ class Session: self.SYSTEM_VERSION, self.APP_VERSION, "en", "", "en", - functions.help.GetTermsOfService(), + functions.help.GetConfig(), ) ) - ).text + ) self.ping_thread = Thread(target=self.ping, name="PingThread") self.ping_thread.start() @@ -168,8 +166,6 @@ class Session: log.debug("Session started") - return terms - def stop(self): self.is_connected.clear()