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

Function onfinished

lib/internal/streams/compose.js:88–99  ·  view source on GitHub ↗
(err)

Source from the content-addressed store, hash-verified

86 let d;
87
88 function onfinished(err) {
89 const cb = onclose;
90 onclose = null;
91
92 if (cb) {
93 cb(err);
94 } else if (err) {
95 d.destroy(err);
96 } else if (!readable && !writable) {
97 d.destroy();
98 }
99 }
100
101 const head = streams[0];
102 const tail = pipeline(streams, onfinished);

Callers

nothing calls this directly

Calls 2

cbFunction · 0.70
destroyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…