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

Method fail

lib/internal/streams/iter/broadcast.js:640–648  ·  view source on GitHub ↗
(reason)

Source from the content-addressed store, hash-verified

638 }
639
640 fail(reason) {
641 if (this.#isClosedOrAborted()) return;
642 this.#aborted = true;
643 this.#closed = PromiseResolve(this.#totalBytes);
644 const error = reason ?? new ERR_INVALID_STATE.TypeError('Failed');
645 this.#rejectPendingWrites(error);
646 this.#rejectPendingDrains(error);
647 this.#broadcast[kAbort](error);
648 }
649
650 [SymbolAsyncDispose]() {
651 this.fail();

Callers 3

[SymbolAsyncDispose]Method · 0.95
[SymbolDispose]Method · 0.95
pumpFunction · 0.45

Calls 3

#isClosedOrAbortedMethod · 0.95
#rejectPendingWritesMethod · 0.95
#rejectPendingDrainsMethod · 0.95

Tested by

no test coverage detected