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

Function cleanup

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

Source from the content-addressed store, hash-verified

22 let done = false
23
24 const cleanup = () => {
25 stream.removeListener('close', onClose)
26 stream.removeListener('error', onError)
27 stream.removeListener('finish', onFinish)
28 }
29
30 const finish = (err, fromErrorEvent = false) => {
31 if (done) {

Callers 4

finishFunction · 0.70
clearRequestStreamFunction · 0.50
trackWritableLifecycleFunction · 0.50
clearRequestStreamFunction · 0.50

Calls 1

removeListenerMethod · 0.45

Tested by

no test coverage detected