diff --git a/src/backend/matrix_client.py b/src/backend/matrix_client.py index a7c23c71..ff6e2f51 100644 --- a/src/backend/matrix_client.py +++ b/src/backend/matrix_client.py @@ -213,6 +213,9 @@ class MatrixClient(nio.AsyncClient): def on_profile_response(future) -> None: """Update our model `Account` with the received profile details.""" + if future.cancelled(): # Account logged out + return + exception = future.exception() if exception: @@ -232,6 +235,9 @@ class MatrixClient(nio.AsyncClient): def on_server_config_response(future) -> None: """Update our model `Account` with the received config details.""" + if future.cancelled(): # Account logged out + return + exception = future.exception() if exception: