mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 01:16:35 +03:00
Handle CancelledError inside mtprotosender recv loop
This commit is contained in:
parent
c3ec775607
commit
4ff7ac6b75
|
@ -503,6 +503,8 @@ class MTProtoSender:
|
|||
self._log.debug('Receiving items from the network...')
|
||||
try:
|
||||
body = await self._connection.recv()
|
||||
except asyncio.CancelledError:
|
||||
raise # bypass except Exception
|
||||
except IOError as e:
|
||||
self._log.info('Connection closed while receiving data')
|
||||
self._start_reconnect(e)
|
||||
|
|
Loading…
Reference in New Issue
Block a user