mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-06-20 03:56:38 +00:00
Fix still broken log for broken packets
This commit is contained in:
parent
6cd96389c0
commit
2922e8df11
@ -190,14 +190,15 @@ class Connection:
|
|||||||
if packet_len <= 12:
|
if packet_len <= 12:
|
||||||
__log__.error('Read invalid packet length %d, '
|
__log__.error('Read invalid packet length %d, '
|
||||||
'reading data left:', packet_len)
|
'reading data left:', packet_len)
|
||||||
while True:
|
data = b''
|
||||||
data = b''
|
try:
|
||||||
try:
|
while True:
|
||||||
data += self.read(1)
|
data += self.read(1)
|
||||||
except TimeoutError:
|
except TimeoutError:
|
||||||
break
|
pass
|
||||||
finally:
|
finally:
|
||||||
__log__.error(repr(data))
|
__log__.error(repr(data))
|
||||||
|
|
||||||
# Connection reset and hope it's fixed after
|
# Connection reset and hope it's fixed after
|
||||||
self.conn.close()
|
self.conn.close()
|
||||||
raise ConnectionResetError()
|
raise ConnectionResetError()
|
||||||
|
Loading…
Reference in New Issue
Block a user