mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-13 04:56:35 +03:00
Except connection timeouts in MTProtoSender
This commit is contained in:
parent
24d2074e0c
commit
df15ee421c
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user