Don't show CancelledError when logging out early
This commit is contained in:
parent
beac0ce3dd
commit
73d54b5788
|
@ -213,6 +213,9 @@ class MatrixClient(nio.AsyncClient):
|
||||||
def on_profile_response(future) -> None:
|
def on_profile_response(future) -> None:
|
||||||
"""Update our model `Account` with the received profile details."""
|
"""Update our model `Account` with the received profile details."""
|
||||||
|
|
||||||
|
if future.cancelled(): # Account logged out
|
||||||
|
return
|
||||||
|
|
||||||
exception = future.exception()
|
exception = future.exception()
|
||||||
|
|
||||||
if exception:
|
if exception:
|
||||||
|
@ -232,6 +235,9 @@ class MatrixClient(nio.AsyncClient):
|
||||||
def on_server_config_response(future) -> None:
|
def on_server_config_response(future) -> None:
|
||||||
"""Update our model `Account` with the received config details."""
|
"""Update our model `Account` with the received config details."""
|
||||||
|
|
||||||
|
if future.cancelled(): # Account logged out
|
||||||
|
return
|
||||||
|
|
||||||
exception = future.exception()
|
exception = future.exception()
|
||||||
|
|
||||||
if exception:
|
if exception:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user