mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-03-03 19:00:21 +03:00
Call disconnect on ConnectionResetError hoping a reconnection
Maybe self._reconnect() had no effect unless a clean disconnect was done, and so retrying would be mostly useless. Just a guess.
This commit is contained in:
parent
55c09cde97
commit
6cd96389c0
|
@ -541,6 +541,11 @@ class TelegramBareClient:
|
||||||
__log__.warning('Connection was reset while invoking')
|
__log__.warning('Connection was reset while invoking')
|
||||||
if self._user_connected:
|
if self._user_connected:
|
||||||
# Server disconnected us, __call__ will try reconnecting.
|
# Server disconnected us, __call__ will try reconnecting.
|
||||||
|
try:
|
||||||
|
self._sender.disconnect()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
return None
|
return None
|
||||||
else:
|
else:
|
||||||
# User never called .connect(), so raise this error.
|
# User never called .connect(), so raise this error.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user