clear subscriptions when connection closes
This commit is contained in:
@@ -373,5 +373,12 @@ export default class Connection {
|
|||||||
for (const c of this.channels.filter(c => c.dispose)) {
|
for (const c of this.channels.filter(c => c.dispose)) {
|
||||||
if (c.dispose) 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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user