Autoreconnect from _invoke fix

Not tested, but seems to work. Investigate first.
This commit is contained in:
Andrey Egorov 2017-10-19 04:43:22 +03:00 committed by GitHub
parent f49208f961
commit 1b6bb6b3ab

View File

@ -499,10 +499,7 @@ class TelegramBareClient:
else:
while self._user_connected and not self._reconnect():
sleep(0.1) # Retry forever until we can send the request
finally:
if sender != self._sender:
sender.disconnect()
return None
try:
raise next(x.rpc_error for x in requests if x.rpc_error)