1
0

clear subscriptions when connection closes

This commit is contained in:
Hazelnoot
2025-03-27 12:17:23 -04:00
parent 831329499d
commit b8fd9d0bc0
@@ -373,5 +373,12 @@ export default class Connection {
for (const c of this.channels.filter(c => c.dispose)) {
if (c.dispose) c.dispose();
}
for (const k of this.subscribingNotes.keys()) {
this.subscriber.off(`noteStream:${k}`, this.onNoteStreamMessage);
}
this.fetchIntervalId = null;
this.channels = [];
this.subscribingNotes.clear();
}
}