Skip to content

Commit

Permalink
fix(datastore): make event history list thread safe (#3509)
Browse files Browse the repository at this point in the history
Co-authored-by: Nika Hassani <[email protected]>
  • Loading branch information
NikaHsn and Nika Hassani authored Aug 3, 2023
1 parent aafc570 commit 98bdb14
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class DataStoreHubEventStreamHandler : EventChannel.StreamHandler {
private var forwardHubResponse: (event: Map<String, Any>) -> Unit

// DataStore hub event history. Used to track events which may be lost on hot restart, such as sync and ready events.
private var eventHistory: MutableList<HubEvent<*>> = mutableListOf()
private var eventHistory: MutableList<HubEvent<*>> = java.util.Collections.synchronizedList(mutableListOf())

// Event types which should be replayed on hot restart.
private val replayEvents: Set<String> = setOf(
Expand Down

0 comments on commit 98bdb14

Please sign in to comment.