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

Function finish

deps/undici/src/lib/api/api-stream.js:30–38  ·  view source on GitHub ↗
(err, fromErrorEvent = false)

Source from the content-addressed store, hash-verified

28 }
29
30 const finish = (err, fromErrorEvent = false) => {
31 if (done) {
32 return
33 }
34
35 done = true
36 cleanup()
37 callback(err, fromErrorEvent)
38 }
39
40 const onClose = () => {
41 const err = getWritableError(stream)

Callers 4

onCloseFunction · 0.70
onErrorFunction · 0.70
onFinishFunction · 0.70
trackWritableLifecycleFunction · 0.50

Calls 2

cleanupFunction · 0.70
callbackFunction · 0.50

Tested by

no test coverage detected