Retry if initial profile retrieval on login fails

This commit is contained in:
miruka
2019-12-16 05:03:57 -04:00
parent 18822b9102
commit 7d8f67bfe2
2 changed files with 5 additions and 3 deletions

View File

@@ -156,7 +156,11 @@ class MatrixClient(nio.AsyncClient):
exception = future.exception()
if exception:
log.warn("On %s client startup: %s", self.user_id, exception)
log.warn("On %s client startup: %r", self.user_id, exception)
self.profile_task = asyncio.ensure_future(
self.backend.get_profile(self.user_id),
)
self.profile_task.add_done_callback(on_profile_response)
return
resp = future.result()