mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 09:26:37 +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...')
|
self._log.debug('Receiving items from the network...')
|
||||||
try:
|
try:
|
||||||
body = await self._connection.recv()
|
body = await self._connection.recv()
|
||||||
|
except asyncio.CancelledError:
|
||||||
|
raise # bypass except Exception
|
||||||
except IOError as e:
|
except IOError as e:
|
||||||
self._log.info('Connection closed while receiving data')
|
self._log.info('Connection closed while receiving data')
|
||||||
self._start_reconnect(e)
|
self._start_reconnect(e)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user