MCPcopy
hub / github.com/socketio/socket.io / _destroy

Method _destroy

packages/socket.io-client/lib/manager.ts:483–496  ·  view source on GitHub ↗

* Called upon a socket close. * * @param socket * @private

(socket: Socket)

Source from the content-addressed store, hash-verified

481 * @private
482 */
483 _destroy(socket: Socket): void {
484 const nsps = Object.keys(this.nsps);
485
486 for (const nsp of nsps) {
487 const socket = this.nsps[nsp];
488
489 if (socket.active) {
490 debug("socket %s is still active, skipping close", nsp);
491 return;
492 }
493 }
494
495 this._close();
496 }
497
498 /**
499 * Writes a packet.

Callers

nothing calls this directly

Calls 3

_closeMethod · 0.95
debugFunction · 0.85
keysMethod · 0.80

Tested by

no test coverage detected