MCPcopy Index your code
hub / github.com/nodejs/node / disconnect

Method disconnect

lib/inspector.js:148–159  ·  view source on GitHub ↗

* Immediately closes the session, all pending * message callbacks will be called with an * error. * @returns {void}

()

Source from the content-addressed store, hash-verified

146 * @returns {void}
147 */
148 disconnect() {
149 if (!this.#connection)
150 return;
151 this.#connection.disconnect();
152 this.#connection = null;
153 const remainingCallbacks = this.#messageCallbacks.values();
154 for (const callback of remainingCallbacks) {
155 process.nextTick(callback, new ERR_INSPECTOR_CLOSED());
156 }
157 this.#messageCallbacks.clear();
158 this.#nextId = 1;
159 }
160}
161
162/**

Callers 9

testFunction · 0.95
testConsoleLogFunction · 0.95
testFunction · 0.95
testFunction · 0.95
testFunction · 0.95
testSampleDebugSessionFunction · 0.95

Calls 3

disconnectMethod · 0.65
clearMethod · 0.65
valuesMethod · 0.45

Tested by 4

testFunction · 0.76
testFunction · 0.76
testFunction · 0.76
testFunction · 0.76