From 397cdb6a6ba5560f72d9653e14713fb170584e1e Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Fri, 3 Apr 2026 14:32:36 -0400 Subject: [PATCH] Making sure the instance is created before running cleaup --- .../vitorpamplona/amethyst/service/call/CallController.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/call/CallController.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/call/CallController.kt index 7788e9a39..fbb96b899 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/call/CallController.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/call/CallController.kt @@ -90,6 +90,9 @@ class CallController( private val peerSessions = ConcurrentHashMap() + // Candidates received before a PeerSession exists for the sender + private val globalPendingIce = ConcurrentHashMap>() + // ---- Shared WebRTC resources ---- private var peerConnectionFactory: PeerConnectionFactory? = null @@ -398,9 +401,6 @@ class CallController( } } - // Candidates received before a PeerSession exists for the sender - private val globalPendingIce = ConcurrentHashMap>() - private fun getGlobalPendingCandidates(peerPubKey: HexKey): List = globalPendingIce.remove(peerPubKey)?.toList() ?: emptyList() private fun flushPendingIceCandidates(