Unregister & Unsubscribe vom SSE für Keys eingebaut
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user