func stop()

in sdk/communication/AzureCommunicationChat/Source/Signaling/CommunicationSignalingClient.swift [124:136]


    func stop() {
        // Guard to check if selfHostedTrouterClient is initialized
        guard let selfHostedTrouterClient = self.selfHostedTrouterClient else {
            logger.error("Failed to stop: SelfHostedTrouterClient is not initialized.")
            return
        }
        
        selfHostedTrouterClient.stop()
        communicationHandlers.forEach { _, handler in
            selfHostedTrouterClient.unregisterListener(handler)
        }
        communicationHandlers.removeAll()
    }