Make is_connected a property

This is consistent with the rest of is_ properties
This commit is contained in:
Lonami Exo
2022-02-16 11:24:20 +01:00
parent 483e2aadf1
commit 4258ce2bc8
6 changed files with 29 additions and 26 deletions

View File

@@ -168,7 +168,7 @@ async def catch_up(self: 'TelegramClient'):
async def _update_loop(self: 'TelegramClient'):
try:
updates_to_dispatch = deque()
while self.is_connected():
while self.is_connected:
if updates_to_dispatch:
await _dispatch(self, *updates_to_dispatch.popleft())
continue