From 64f44858c3b99a79a5d49bd7f685b2b3f28c0595 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Thu, 19 Oct 2023 08:46:11 +0200 Subject: [PATCH] make sure to remove all sessions from anode and not just some (#411) --- packages/matter.js/src/session/SessionManager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/matter.js/src/session/SessionManager.ts b/packages/matter.js/src/session/SessionManager.ts index d20818d9df..d5ea043c8d 100644 --- a/packages/matter.js/src/session/SessionManager.ts +++ b/packages/matter.js/src/session/SessionManager.ts @@ -142,7 +142,7 @@ export class SessionManager { async removeAllSessionsForNode(nodeId: NodeId) { for (const session of this.sessions.values()) { - if (!session.isSecure()) return; + if (!session.isSecure()) continue; const secureSession = session as SecureSession; if (secureSession.getPeerNodeId() === nodeId) { await secureSession.destroy(false);