From 6a9e436d188dab1db5e5849593a0afebc6cf76f7 Mon Sep 17 00:00:00 2001 From: hiroshihorie <548776+hiroshihorie@users.noreply.github.com> Date: Sat, 1 Jun 2024 02:10:48 +0900 Subject: [PATCH] clear e2eeManager instance --- Sources/LiveKit/Core/Room+EngineDelegate.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/LiveKit/Core/Room+EngineDelegate.swift b/Sources/LiveKit/Core/Room+EngineDelegate.swift index 08e371949..09038c261 100644 --- a/Sources/LiveKit/Core/Room+EngineDelegate.swift +++ b/Sources/LiveKit/Core/Room+EngineDelegate.swift @@ -53,6 +53,8 @@ extension Room: EngineDelegate { // Re-connecting delegates.notify { $0.roomIsReconnecting?(self) } } else if case .disconnected = state.connectionState { + // Clear out e2eeManager instance + e2eeManager = nil // Disconnected if case .connecting = oldState.connectionState { delegates.notify { $0.room?(self, didFailToConnectWithError: oldState.disconnectError) }