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

Function onClose

deps/undici/src/lib/api/api-stream.js:40–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38 }
39
40 const onClose = () => {
41 const err = getWritableError(stream)
42 finish(err ?? (!stream.writableFinished ? createPrematureCloseError() : undefined))
43 }
44
45 const onError = (err) => finish(err, true)
46 const onFinish = () => finish()

Callers

nothing calls this directly

Calls 3

getWritableErrorFunction · 0.70
finishFunction · 0.70

Tested by

no test coverage detected