diff --git a/changelog.d/5552.bugfix b/changelog.d/5552.bugfix new file mode 100644 index 0000000000..5061e642f0 --- /dev/null +++ b/changelog.d/5552.bugfix @@ -0,0 +1 @@ +Fix crash when closing a room while decrypting timeline events diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/TimelineEventDecryptor.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/TimelineEventDecryptor.kt index bacac58d84..3ddd877b78 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/TimelineEventDecryptor.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/TimelineEventDecryptor.kt @@ -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") } } }