Fix crash when closing room during timeline decryption

This commit is contained in:
SpiritCroc 2022-03-16 10:11:48 +01:00
parent 17d363cf9a
commit a994f859e1
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")
}
}
}