MCPcopy Create free account
hub / github.com/FlashpointProject/launcher / onClose

Method onClose

src/shared/back/SocketClient.ts:253–269  ·  view source on GitHub ↗
(event: CloseEvent)

Source from the content-addressed store, hash-verified

251 }
252
253 protected onClose(event: CloseEvent): void {
254 if (this.abortReconnects) {
255 console.log('Socket Client - Connection closed.');
256 if (this.killOnDisconnect) {
257 process.exit(process.pid);
258 }
259 if (this.onStateChange) {
260 this.onStateChange(false);
261 }
262 } else {
263 console.log(`SharedSocket Closed (Code: ${event.code}, Clean: ${event.wasClean}, Reason: "${event.reason}", URL: "${this.url}").`);
264 if (this.onStateChange) {
265 this.onStateChange(false);
266 }
267 this.reconnect();
268 }
269 }
270
271 // Static
272

Callers

nothing calls this directly

Calls 1

reconnectMethod · 0.95

Tested by

no test coverage detected