mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2025-04-13 09:44:40 +00:00
clear subscriptions when connection closes
This commit is contained in:
parent
831329499d
commit
b8fd9d0bc0
1 changed files with 7 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue