From 63dfb1e3ead5335e05bf30f96bfba146e5f529d8 Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Tue, 17 Oct 2017 10:15:13 +0200 Subject: [PATCH] Fix processing messages pending of acknowledge many times --- telethon/network/mtproto_sender.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/telethon/network/mtproto_sender.py b/telethon/network/mtproto_sender.py index 520cadbf..16a82bbd 100644 --- a/telethon/network/mtproto_sender.py +++ b/telethon/network/mtproto_sender.py @@ -174,6 +174,15 @@ class MtProtoSender: """ # TODO Check salt, session_id and sequence_number + if msg_id in self._need_confirmation: + # We're yet to acknowledge this message already, so just drop it + # as we are already aware of it. TODO Should we force acknowledging + # all the self._need_confirmation IDs? + self._logger.debug( + 'Ignoring message pending of acknowledge: {}'.format(msg_id) + ) + return False + self._need_confirmation.append(msg_id) code = reader.read_int(signed=False)