Unregister & Unsubscribe vom SSE für Keys eingebaut

This commit is contained in:
Bastian Wagner
2026-03-09 12:59:59 +01:00
parent b3fd7fbf03
commit 1480e8d7b2
4 changed files with 40 additions and 5 deletions

View File

@@ -19,4 +19,12 @@ export class SseService {
this.clients.set(userId, subj);
return subj;
}
unregister(userId: string) {
if (!this.clients.has(userId)) { return; }
const sub = this.clients.get(userId);
sub.unsubscribe();
this.clients.delete(userId);
}
}