Skip to content

Commit

Permalink
fix: stale participant concurrent modification exeption [WPB-15340] (#…
Browse files Browse the repository at this point in the history
…3278) (#3280)

* fix: stale participant concurrent modification exeption

* revert private variable

Co-authored-by: Jakub Żerko <[email protected]>
  • Loading branch information
github-actions[bot] and Garzas authored Feb 7, 2025
1 parent c1b6eba commit c7128c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -686,8 +686,11 @@ internal class CallDataSource(
callJobs.remove(conversationId)?.cancel()

// Cancel all jobs for removing stale participants
staleParticipantJobs.values.forEach { it.cancel() }
staleParticipantJobs.clear()
staleParticipantJobs.block { map ->
val jobsSnapshot = map.values.toList()
jobsSnapshot.forEach { it.cancel() }
map.clear()
}

leaveSubconversation(conversationId, CALL_SUBCONVERSATION_ID)
.onSuccess {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ internal class ConfirmationDeliveryHandlerImpl(
leadingMessage = "Skipping group conversation: ${conversation.id.toLogString()}",
jsonStringKeyValues = mapOf(
"conversationId" to conversation.id.toLogString(),
"messages" to messages.joinToString { it.obfuscateId() },
"messageCount" to messages.size
)
)
Expand Down

0 comments on commit c7128c5

Please sign in to comment.