Skip to content

Commit

Permalink
make sure to remove all sessions from anode and not just some (#411)
Browse files Browse the repository at this point in the history
  • Loading branch information
Apollon77 authored Oct 19, 2023
1 parent 5722d4e commit 64f4485
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/matter.js/src/session/SessionManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export class SessionManager<ContextT> {

async removeAllSessionsForNode(nodeId: NodeId) {
for (const session of this.sessions.values()) {
if (!session.isSecure()) return;
if (!session.isSecure()) continue;
const secureSession = session as SecureSession<any>;
if (secureSession.getPeerNodeId() === nodeId) {
await secureSession.destroy(false);
Expand Down

0 comments on commit 64f4485

Please sign in to comment.