mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-01 11:46:57 +01:00
Merge pull request #3720 from vector-im/feature/bma/fix_signout_crash
Fix a crash which can happen when user signs out.
This commit is contained in:
commit
cededa8c3b
1
changelog.d/3720.bugfix
Normal file
1
changelog.d/3720.bugfix
Normal file
@ -0,0 +1 @@
|
|||||||
|
Fix a crash which can happen when user signs out
|
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
package org.matrix.android.sdk.internal.crypto
|
package org.matrix.android.sdk.internal.crypto
|
||||||
|
|
||||||
|
import kotlinx.coroutines.CancellationException
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import org.matrix.android.sdk.api.MatrixPatterns
|
import org.matrix.android.sdk.api.MatrixPatterns
|
||||||
import org.matrix.android.sdk.api.auth.data.Credentials
|
import org.matrix.android.sdk.api.auth.data.Credentials
|
||||||
@ -336,7 +337,12 @@ internal class DeviceListManager @Inject constructor(private val cryptoStore: IM
|
|||||||
downloadKeysForUsersTask.execute(params)
|
downloadKeysForUsersTask.execute(params)
|
||||||
} catch (throwable: Throwable) {
|
} catch (throwable: Throwable) {
|
||||||
Timber.e(throwable, "## CRYPTO | doKeyDownloadForUsers(): error")
|
Timber.e(throwable, "## CRYPTO | doKeyDownloadForUsers(): error")
|
||||||
onKeysDownloadFailed(filteredUsers)
|
if (throwable is CancellationException) {
|
||||||
|
// the crypto module is getting closed, so we cannot access the DB anymore
|
||||||
|
Timber.w("The crypto module is closed, ignoring this error")
|
||||||
|
} else {
|
||||||
|
onKeysDownloadFailed(filteredUsers)
|
||||||
|
}
|
||||||
throw throwable
|
throw throwable
|
||||||
}
|
}
|
||||||
Timber.v("## CRYPTO | doKeyDownloadForUsers() : Got keys for " + filteredUsers.size + " users")
|
Timber.v("## CRYPTO | doKeyDownloadForUsers() : Got keys for " + filteredUsers.size + " users")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user