-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid restoring several MatrixClient #3050
Conversation
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #3050 +/- ##
===========================================
- Coverage 75.86% 75.86% -0.01%
===========================================
Files 1628 1628
Lines 38378 38378
Branches 7410 7410
===========================================
- Hits 29117 29115 -2
- Misses 5388 5389 +1
- Partials 3873 3874 +1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, nice! Hopefully this might get rid of the duplicate refreshes.
Just a note: I was also trying to investigate this and I noticed MatrixClientProvider.restoreWithSavedState
is the only method that doesn't use the Mutex to restore the session. While it's quite unlikely there may be a moment when the client already exists but sessionIdsToMatrixClient
is not updated if I'm not mistaken. Maybe it's worth it to add a lock there too.
Yes, good point. I have done it a bit differently, and I think it's fine: 874bf5b is it OK for you? |
Yes, that's actually a lot simpler, thanks! |
Quality Gate passedIssues Measures |
Type of change
Content
Use MatrixClientProvider instead of restoring a MatrixClient from the AuthenticationService.
Motivation and context
Attempt to fix #3028
Screenshots / GIFs
Tests
Tested devices
Checklist