mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-06-19 11:36:41 +00:00
Handle BufferError's more gracefully
This commit is contained in:
parent
78155a21bd
commit
2a3e5e5ed2
@ -89,7 +89,11 @@ class MtProtoSender:
|
|||||||
with self._recv_lock:
|
with self._recv_lock:
|
||||||
try:
|
try:
|
||||||
body = self.connection.recv()
|
body = self.connection.recv()
|
||||||
except InvalidChecksumError:
|
except (BufferError, InvalidChecksumError):
|
||||||
|
# TODO BufferError, we should spot the cause...
|
||||||
|
# "No more bytes left"; something wrong happened, clear
|
||||||
|
# everything to be on the safe side, or:
|
||||||
|
#
|
||||||
# "This packet should be skipped"; since this may have
|
# "This packet should be skipped"; since this may have
|
||||||
# been a result for a request, invalidate every request
|
# been a result for a request, invalidate every request
|
||||||
# and just re-invoke them to avoid problems
|
# and just re-invoke them to avoid problems
|
||||||
|
Loading…
Reference in New Issue
Block a user