mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-16 20:10:04 +03:00
safeguard for save after store closed
This commit is contained in:
parent
9bf5059631
commit
9e921d8b50
1 changed files with 4 additions and 1 deletions
|
@ -19,6 +19,7 @@ package org.matrix.android.sdk.internal.crypto
|
||||||
import android.util.LruCache
|
import android.util.LruCache
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
import org.matrix.android.sdk.api.extensions.tryOrNull
|
||||||
import org.matrix.android.sdk.internal.crypto.model.OlmInboundGroupSessionWrapper2
|
import org.matrix.android.sdk.internal.crypto.model.OlmInboundGroupSessionWrapper2
|
||||||
import org.matrix.android.sdk.internal.crypto.store.IMXCryptoStore
|
import org.matrix.android.sdk.internal.crypto.store.IMXCryptoStore
|
||||||
import org.matrix.android.sdk.internal.util.MatrixCoroutineDispatchers
|
import org.matrix.android.sdk.internal.util.MatrixCoroutineDispatchers
|
||||||
|
@ -90,7 +91,9 @@ internal class InboundGroupSessionStore @Inject constructor(
|
||||||
dirtySession.clear()
|
dirtySession.clear()
|
||||||
cryptoCoroutineScope.launch(coroutineDispatchers.crypto) {
|
cryptoCoroutineScope.launch(coroutineDispatchers.crypto) {
|
||||||
Timber.v("## Inbound: getInboundGroupSession batching save of ${dirtySession.size}")
|
Timber.v("## Inbound: getInboundGroupSession batching save of ${dirtySession.size}")
|
||||||
store.storeInboundGroupSessions(toSave)
|
tryOrNull {
|
||||||
|
store.storeInboundGroupSessions(toSave)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue