mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-22 09:25:49 +03:00
Merge pull request #3538 from vector-im/feature/fga/fix_signout
Fix crash on signout: release session at the end of clean up
This commit is contained in:
commit
434018074d
2 changed files with 6 additions and 5 deletions
1
changelog.d/3538.bugfix
Normal file
1
changelog.d/3538.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
Fix crash on signout: release session at the end of clean up.
|
|
@ -51,15 +51,12 @@ internal class CleanupSession @Inject constructor(
|
|||
@UserMd5 private val userMd5: String
|
||||
) {
|
||||
suspend fun handle() {
|
||||
Timber.d("Cleanup: release session...")
|
||||
sessionManager.releaseSession(sessionId)
|
||||
Timber.d("Cleanup: delete session params...")
|
||||
sessionParamsStore.delete(sessionId)
|
||||
|
||||
Timber.d("Cleanup: cancel pending works...")
|
||||
workManagerProvider.cancelAllWorks()
|
||||
|
||||
Timber.d("Cleanup: delete session params...")
|
||||
sessionParamsStore.delete(sessionId)
|
||||
|
||||
Timber.d("Cleanup: clear session data...")
|
||||
clearSessionDataTask.execute(Unit)
|
||||
|
||||
|
@ -74,6 +71,9 @@ internal class CleanupSession @Inject constructor(
|
|||
realmKeysUtils.clear(SessionModule.getKeyAlias(userMd5))
|
||||
realmKeysUtils.clear(CryptoModule.getKeyAlias(userMd5))
|
||||
|
||||
Timber.d("Cleanup: release session...")
|
||||
sessionManager.releaseSession(sessionId)
|
||||
|
||||
// Sanity check
|
||||
if (BuildConfig.DEBUG) {
|
||||
Realm.getGlobalInstanceCount(realmSessionConfiguration)
|
||||
|
|
Loading…
Reference in a new issue