From 3097cadd8a042a1943797214bb0e30a2ac90a53e Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Thu, 8 Feb 2018 17:23:37 +0100 Subject: [PATCH] Clean --- pyrogram/session/session.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/pyrogram/session/session.py b/pyrogram/session/session.py index 9fb109ab..8f5798bd 100644 --- a/pyrogram/session/session.py +++ b/pyrogram/session/session.py @@ -254,7 +254,6 @@ class Session: self.update_handler = update_handler def unpack_dispatch_and_ack(self, packet: bytes): - # TODO: A better dispatcher data = self.unpack(BytesIO(packet)) messages = ( @@ -265,9 +264,6 @@ class Session: log.debug(data) - self.total_bytes += len(packet) - self.total_messages += len(messages) - for i in messages: if i.seq_no % 2 != 0: if i.msg_id in self.pending_acks: @@ -275,8 +271,6 @@ class Session: else: self.pending_acks.add(i.msg_id) - # log.debug("{}".format(type(i.body))) - if isinstance(i.body, (types.MsgDetailedInfo, types.MsgNewDetailedInfo)): self.pending_acks.add(i.body.answer_msg_id) continue @@ -300,14 +294,6 @@ class Session: self.results[msg_id].value = getattr(i.body, "result", i.body) self.results[msg_id].event.set() - # print( - # "This packet bytes: ({}) | Total bytes: ({})\n" - # "This packet messages: ({}) | Total messages: ({})\n" - # "Total connections: ({})".format( - # len(packet), self.total_bytes, len(messages), self.total_messages, self.total_connections - # ) - # ) - if len(self.pending_acks) >= self.ACKS_THRESHOLD: log.info("Send {} acks".format(len(self.pending_acks)))