mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-03-03 19:00:21 +03:00
Fix handle RpcResult not always returning a bool
This commit is contained in:
parent
0c1170ee61
commit
7bb7cb039f
|
@ -351,8 +351,9 @@ class MtProtoSender:
|
||||||
# else TODO Where should this error be reported?
|
# else TODO Where should this error be reported?
|
||||||
# Read may be async. Can an error not-belong to a request?
|
# Read may be async. Can an error not-belong to a request?
|
||||||
self._logger.debug('Read RPC error: %s', str(error))
|
self._logger.debug('Read RPC error: %s', str(error))
|
||||||
else:
|
return True # All contents were read okay
|
||||||
if request:
|
|
||||||
|
elif request:
|
||||||
self._logger.debug('Reading request response')
|
self._logger.debug('Reading request response')
|
||||||
if inner_code == 0x3072cfa1: # GZip packed
|
if inner_code == 0x3072cfa1: # GZip packed
|
||||||
unpacked_data = gzip.decompress(reader.tgread_bytes())
|
unpacked_data = gzip.decompress(reader.tgread_bytes())
|
||||||
|
@ -365,7 +366,7 @@ class MtProtoSender:
|
||||||
self.session.process_entities(request.result)
|
self.session.process_entities(request.result)
|
||||||
request.confirm_received.set()
|
request.confirm_received.set()
|
||||||
return True
|
return True
|
||||||
else:
|
|
||||||
# If it's really a result for RPC from previous connection
|
# If it's really a result for RPC from previous connection
|
||||||
# session, it will be skipped by the handle_container()
|
# session, it will be skipped by the handle_container()
|
||||||
self._logger.debug('Lost request will be skipped.')
|
self._logger.debug('Lost request will be skipped.')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user