Bugfix in reconnection

This commit is contained in:
Andrey Egorov
2017-11-14 13:52:33 +03:00
parent 5e172053da
commit 25af22f1e7
2 changed files with 67 additions and 10 deletions

View File

@@ -444,7 +444,7 @@ class TelegramBareClient:
self._logger.debug('Server disconnected us. Reconnecting and '
'resending request... (%d)' % retry)
await self._reconnect()
if not self._sender.is_connected():
if not self.is_connected():
await asyncio.sleep(retry + 1, loop=self._loop)
return None