Skip to content

Commit

Permalink
user: add more is_logged_in logging
Browse files Browse the repository at this point in the history
Signed-off-by: Sumner Evans <[email protected]>
  • Loading branch information
sumnerevans committed Mar 15, 2023
1 parent c633a60 commit fe3bca7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions linkedin_matrix/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,14 @@ async def reconnect(self):
self._is_refreshing = False

async def is_logged_in(self) -> bool:
self.log.debug("Checking if logged in")
if not self.client:
self.log.debug("Not logged in: no client")
return False
if self._is_logged_in is None:
try:
self._is_logged_in = await self.client.logged_in()
self.log.debug("checked if client is logged in: %s", self._is_logged_in)
except Exception:
self.log.exception("Exception checking login status")
self._is_logged_in = False
Expand Down

0 comments on commit fe3bca7

Please sign in to comment.