Remove unnecessary .disconnect() from ._invoke() (#356)

This commit is contained in:
Andrey Egorov 2017-10-19 11:51:34 +03:00 committed by Lonami
parent 0e1249c833
commit 050cd95d32

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)