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

@ -6,7 +6,6 @@
## Media
- Clean up gui test md
- Pause raise error
- Send the monitor PR
- nio ClientTimeout
@ -51,7 +50,6 @@
- first undecryptable message
- Adding an account with no rooms
- Join button 502
- Retry the initial profile retrieval if it fails (due to e.g. dead server)
- Leave box button focus
- two upload delegates height bug

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()