MCPcopy
hub / github.com/redis/node-redis / destroySocket

Method destroySocket

packages/client/lib/client/socket.ts:433–444  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

431 }
432
433 destroySocket() {
434 const wasReady = this.#isReady;
435 this.#isReady = false;
436
437 if (this.#socket) {
438 this.#socket.destroy();
439 this.#socket = undefined;
440 }
441
442 publish(CHANNELS.CONNECTION_CLOSED, () => ({ clientId: this.#clientId, reason: 'application_close', wasConnected: wasReady }));
443 this.emit('end');
444 }
445
446 ref() {
447 this.#isSocketUnrefed = false;

Callers 4

quitMethod · 0.95
destroyMethod · 0.95
closeMethod · 0.80
maybeCloseMethod · 0.80

Calls 2

publishFunction · 0.90
destroyMethod · 0.65

Tested by

no test coverage detected