mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-18 20:29:10 +03:00
Merge pull request #6362 from vector-im/bugfix/adm/dispatch-to-crash
Fixing concurrent `dispatchTo` crash
This commit is contained in:
commit
9925cf9996
2 changed files with 3 additions and 1 deletions
1
changelog.d/5821.bugfix
Normal file
1
changelog.d/5821.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
Fixes concurrent modification crash when signing out or launching the app
|
|
@ -19,12 +19,13 @@ package org.matrix.android.sdk.internal.session
|
|||
import org.matrix.android.sdk.api.extensions.tryOrNull
|
||||
import org.matrix.android.sdk.api.session.Session
|
||||
import timber.log.Timber
|
||||
import java.util.concurrent.CopyOnWriteArraySet
|
||||
import javax.inject.Inject
|
||||
|
||||
@SessionScope
|
||||
internal class SessionListeners @Inject constructor() {
|
||||
|
||||
private val listeners = mutableSetOf<Session.Listener>()
|
||||
private val listeners = CopyOnWriteArraySet<Session.Listener>()
|
||||
|
||||
fun addListener(listener: Session.Listener) {
|
||||
synchronized(listeners) {
|
||||
|
|
Loading…
Add table
Reference in a new issue