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

Method close

deps/undici/src/lib/web/eventsource/eventsource.js:356–363  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

354 * CLOSED.
355 */
356 close () {
357 webidl.brandCheck(this, EventSource)
358
359 if (this.#readyState === CLOSED) return
360 this.#readyState = CLOSED
361 this.#controller.abort()
362 this.#request = null
363 }
364
365 get onopen () {
366 return this.#events.open

Callers 1

#connectMethod · 0.95

Calls 2

brandCheckMethod · 0.80
abortMethod · 0.65

Tested by

no test coverage detected