MCPcopy
hub / github.com/simstudioai/sim / onStreamAbort

Function onStreamAbort

apps/sim/lib/core/utils/multipart.ts:211–216  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

209 // until maxDuration. Detach when the stream closes so it can't fire afterward.
210 if (signal) {
211 const onStreamAbort = () => {
212 const reason = signal.reason instanceof Error ? signal.reason : new Error('Aborted')
213 stream.destroy(reason)
214 nodeStream.destroy(reason)
215 bb.destroy()
216 }
217 if (signal.aborted) onStreamAbort()
218 else {
219 signal.addEventListener('abort', onStreamAbort, { once: true })

Callers 1

readMultipartFunction · 0.85

Calls 1

destroyMethod · 0.65

Tested by

no test coverage detected