Skip to content

Commit 740a682

Browse files
committed
Fix memory leak in the memory store
1 parent 5021cf0 commit 740a682

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/store/memory.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ export class MemoryStore implements IStore {
185185
*/
186186
public removeRoom(roomId: string): void {
187187
if (this.rooms[roomId]) {
188-
this.rooms[roomId].removeListener("RoomState.members", this.onRoomMember);
188+
this.rooms[roomId].currentState.removeListener("RoomState.members", this.onRoomMember);
189189
}
190190
delete this.rooms[roomId];
191191
}

0 commit comments

Comments
 (0)