diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/EventInsertLiveObserver.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/EventInsertLiveObserver.kt index 38d80c3436..6ccd4ae03e 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/EventInsertLiveObserver.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/EventInsertLiveObserver.kt @@ -46,7 +46,7 @@ internal class EventInsertLiveObserver @Inject constructor(@SessionDatabase real observerScope.launch { lock.withLock { if (!results.isLoaded || results.isEmpty()) { - return@launch + return@withLock } val idsToDeleteAfterProcess = ArrayList() val filteredEvents = ArrayList(results.size)