Merge pull request #5552 from SpiritCroc/timeline-decryptor-crash

Fix crash when closing room during timeline decryption
This commit is contained in:
Valere 2022-03-18 11:34:27 +01:00 committed by GitHub
commit 189683a8a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

1
changelog.d/5552.bugfix Normal file
View File

@ -0,0 +1 @@
Fix crash when closing a room while decrypting timeline events

View File

@ -100,8 +100,12 @@ internal class TimelineEventDecryptor @Inject constructor(
}
executor?.execute {
Realm.getInstance(realmConfiguration).use { realm ->
runBlocking {
processDecryptRequest(request, realm)
try {
runBlocking {
processDecryptRequest(request, realm)
}
} catch (e: InterruptedException) {
Timber.i("Decryption got interrupted")
}
}
}