func off()

in sdk/communication/AzureCommunicationChat/Source/Signaling/CommunicationSignalingClient.swift [151:162]


    func off(event: ChatEventId) {
        // Guard to check if selfHostedTrouterClient is initialized
        guard let selfHostedTrouterClient = self.selfHostedTrouterClient else {
            logger.error("Failed to unregister event handler: SelfHostedTrouterClient is not initialized.")
            return
        }
        
        if let communicationHandler = communicationHandlers[event] {
            selfHostedTrouterClient.unregisterListener(communicationHandler)
            communicationHandlers.removeValue(forKey: event)
        }
    }