Fix processing messages pending of acknowledge many times

This commit is contained in:
Lonami Exo 2017-10-17 10:15:13 +02:00
parent ed77ba6f8f
commit 63dfb1e3ea

View File

@ -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)