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

Function abort

deps/undici/undici.js:12463–12483  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12461 function buildAbort(acRef) {
12462 return abort;
12463 function abort() {
12464 const ac = acRef.deref();
12465 if (ac !== void 0) {
12466 requestFinalizer.unregister(abort);
12467 this.removeEventListener("abort", abort);
12468 ac.abort(this.reason);
12469 const controllerList = dependentControllerMap.get(ac.signal);
12470 if (controllerList !== void 0) {
12471 if (controllerList.size !== 0) {
12472 for (const ref of controllerList) {
12473 const ctrl = ref.deref();
12474 if (ctrl !== void 0) {
12475 ctrl.abort(this.reason);
12476 }
12477 }
12478 controllerList.clear();
12479 }
12480 dependentControllerMap.delete(ac.signal);
12481 }
12482 }
12483 }
12484 __name(abort, "abort");
12485 }
12486 __name(buildAbort, "buildAbort");

Callers 10

writeBufferFunction · 0.70
writeBlobFunction · 0.70
destroyMethod · 0.70
writeH2Function · 0.70
writeStreamFunction · 0.70
writeIterableFunction · 0.70
onRequestStartFunction · 0.70
addSignalFunction · 0.70
onResponseStartMethod · 0.70
constructorMethod · 0.70

Calls 6

removeSignalFunction · 0.70
removeEventListenerMethod · 0.65
abortMethod · 0.65
getMethod · 0.65
clearMethod · 0.65
deleteMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…