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

Function willEmitClose

lib/internal/streams/utils.js:285–297  ·  view source on GitHub ↗
(stream)

Source from the content-addressed store, hash-verified

283}
284
285function willEmitClose(stream) {
286 if (!isNodeStream(stream)) return null;
287
288 const wState = stream._writableState;
289 const rState = stream._readableState;
290 const state = wState || rState;
291
292 return (!state && isServerResponse(stream)) || !!(
293 state?.autoDestroy &&
294 state.emitClose &&
295 state.closed === false
296 );
297}
298
299function isDisturbed(stream) {
300 return !!(stream && (

Callers

nothing calls this directly

Calls 2

isNodeStreamFunction · 0.85
isServerResponseFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…