Add note for future self when handling gzip packed data

This commit is contained in:
Lonami Exo 2017-10-20 22:44:00 +02:00
parent 1a91c024fc
commit 2782a08ed0

View File

@ -412,6 +412,11 @@ class MtProtoSender:
def _handle_gzip_packed(self, msg_id, sequence, reader, state):
self._logger.debug('Handling gzip packed data')
with BinaryReader(GzipPacked.read(reader)) as compressed_reader:
# We are reentering process_msg, which seemingly the same msg_id
# to the self._need_confirmation set. Remove it from there first
# to avoid any future conflicts (i.e. if we "ignore" messages
# that we are already aware of, see 1a91c02 and old 63dfb1e)
self._need_confirmation -= {msg_id}
return self._process_msg(msg_id, sequence, compressed_reader, state)
# endregion