mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-02-22 06:25:11 +03:00
Use ._logger.exception when .connect fails (#373)
This commit is contained in:
parent
07cb001854
commit
4ac88a1505
|
@ -204,12 +204,10 @@ class TelegramBareClient:
|
||||||
self.disconnect()
|
self.disconnect()
|
||||||
return self.connect(_sync_updates=_sync_updates)
|
return self.connect(_sync_updates=_sync_updates)
|
||||||
|
|
||||||
except (RPCError, ConnectionError) as error:
|
except (RPCError, ConnectionError):
|
||||||
# Probably errors from the previous session, ignore them
|
# Probably errors from the previous session, ignore them
|
||||||
self.disconnect()
|
self.disconnect()
|
||||||
self._logger.debug(
|
self._logger.exception('Could not stabilise initial connection.')
|
||||||
'Could not stabilise initial connection: {}'.format(error)
|
|
||||||
)
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def is_connected(self):
|
def is_connected(self):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user