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

Function shutdown

lib/internal/webstreams/readablestream.js:1537–1549  ·  view source on GitHub ↗
(rejected, error)

Source from the content-addressed store, hash-verified

1535 }
1536
1537 function shutdown(rejected, error) {
1538 if (shuttingDown) return;
1539 shuttingDown = true;
1540 if (dest[kState].state === 'writable' &&
1541 !writableStreamCloseQueuedOrInFlight(dest)) {
1542 PromisePrototypeThen(
1543 waitForCurrentWrite(),
1544 () => finalize(rejected, error),
1545 (error) => finalize(true, error));
1546 return;
1547 }
1548 finalize(rejected, error);
1549 }
1550
1551 function abortAlgorithm() {
1552 let error;

Callers 1

readableStreamPipeToFunction · 0.70

Calls 3

waitForCurrentWriteFunction · 0.85
finalizeFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…