MCPcopy Create free account
hub / github.com/nodejs/node / close

Method close

deps/undici/undici.js:16913–16919  ·  view source on GitHub ↗

* Closes the connection, if any, and sets the readyState attribute to * CLOSED.

()

Source from the content-addressed store, hash-verified

16911 * CLOSED.
16912 */
16913 close() {
16914 webidl.brandCheck(this, _EventSource);
16915 if (this.#readyState === CLOSED) return;
16916 this.#readyState = CLOSED;
16917 this.#controller.abort();
16918 this.#request = null;
16919 }
16920 get onopen() {
16921 return this.#events.open;
16922 }

Callers 1

#connectMethod · 0.95

Calls 2

brandCheckMethod · 0.80
abortMethod · 0.65

Tested by

no test coverage detected