Skip to content

Commit

Permalink
Create copy of observations in Observers.onConnected (#841)
Browse files Browse the repository at this point in the history
  • Loading branch information
twyatt authored Jan 24, 2025
1 parent 7257014 commit 8587cfe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kable-core/src/commonMain/kotlin/Observers.kt
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ internal class Observers<T>(

suspend fun onConnected() {
synchronized(lock) {
observations.entries
observations.entries.toSet()
}.forEach { (_, observation) ->
// Pipe failures to `characteristicChanges` while honoring in-flight connection cancellations.
try {
Expand Down

0 comments on commit 8587cfe

Please sign in to comment.