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

Method terminate

deps/undici/src/lib/web/fetch/index.js:117–125  ·  view source on GitHub ↗
(reason)

Source from the content-addressed store, hash-verified

115 }
116
117 terminate (reason) {
118 if (this.state !== 'ongoing') {
119 return
120 }
121
122 this.state = 'terminated'
123 this.connection?.destroy(reason)
124 this.emit('terminated', reason)
125 }
126
127 // https://fetch.spec.whatwg.org/#fetch-controller-abort
128 abort (error) {

Callers 4

mainFetchFunction · 0.45
processBodyErrorFunction · 0.45
httpNetworkFetchFunction · 0.45
onResponseErrorFunction · 0.45

Calls 2

destroyMethod · 0.45
emitMethod · 0.45

Tested by

no test coverage detected