MCPcopy Create free account
hub / github.com/DeepNotesApp/DeepNotes / destroySocket

Method destroySocket

apps/realtime-server/src/sockets.ts:489–507  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

487 });
488
489 destroySocket() {
490 // Clear auxiliar object
491
492 this.socket.aux = null as any;
493
494 this.socket.terminate();
495
496 // Unsubscribe from user notifications
497
498 void getSub().unsubscribe(`user-notification:${this.userId}`);
499
500 getSub().off('message', this._handleUserNotification);
501
502 // Remove update listeners
503
504 for (const updateListener of this._listeners.values()) {
505 void dataAbstraction().removeUpdateListener(updateListener);
506 }
507 }
508}

Callers 4

setupMethod · 0.95
constructorMethod · 0.45
ws-server.tsFile · 0.45

Calls 2

unsubscribeMethod · 0.80
removeUpdateListenerMethod · 0.80

Tested by

no test coverage detected