Implement a mechanism to notify of connection failures (#852)

This commit is contained in:
Dan Elkouby
2018-06-17 20:29:41 +03:00
committed by Lonami
parent d9d586171f
commit d5b349e031
3 changed files with 44 additions and 3 deletions

View File

@@ -218,6 +218,14 @@ class TelegramBaseClient(abc.ABC):
def loop(self):
return self._loop
@property
def disconnected(self):
"""
Future that resolves when the connection to Telegram
ends, either by user action or in the background.
"""
return self._sender.disconnected
# endregion
# region Connecting