mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 12:59:46 +00:00
Except connection timeouts in MTProtoSender
This commit is contained in:
@@ -203,10 +203,10 @@ class MTProtoSender:
|
|||||||
try:
|
try:
|
||||||
__log__.debug('Connection attempt {}...'.format(retry))
|
__log__.debug('Connection attempt {}...'.format(retry))
|
||||||
await self._connection.connect(self._ip, self._port)
|
await self._connection.connect(self._ip, self._port)
|
||||||
except OSError as e:
|
except (asyncio.TimeoutError, OSError) as e:
|
||||||
_last_error = e
|
_last_error = e
|
||||||
__log__.warning('Attempt {} at connecting failed: {}'
|
__log__.warning('Attempt {} at connecting failed: {}: {}'
|
||||||
.format(retry, e))
|
.format(retry, type(e).__name__, e))
|
||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
|
Reference in New Issue
Block a user