MCPcopy
hub / github.com/chartbrew/chartbrew / disconnect

Method disconnect

client/src/modules/socketClient.js:118–131  ·  view source on GitHub ↗

* Disconnect socket

()

Source from the content-addressed store, hash-verified

116 * Disconnect socket
117 */
118 disconnect() {
119 if (this.socket) {
120 // Remove all listeners
121 this.listeners.forEach((handler, event) => {
122 this.socket.off(event, handler);
123 });
124 this.listeners.clear();
125 this.conversationRooms.clear();
126
127 this.socket.disconnect();
128 this.socket = null;
129 this.isAuthenticated = false;
130 }
131 }
132
133 /**
134 * Join a conversation room

Callers 4

connectMethod · 0.95
ChartFunction · 0.45
KpiModeFunction · 0.45
GaugeChartFunction · 0.45

Calls 1

offMethod · 0.80

Tested by

no test coverage detected