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

Function buildAbort

deps/undici/undici.js:12461–12485  ·  view source on GitHub ↗
(acRef)

Source from the content-addressed store, hash-verified

12459 abortSignalHasEventHandlerLeakWarning = false;
12460 }
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");
12487 var patchMethodWarning = false;
12488 var Request = class _Request {

Callers 2

constructorMethod · 0.70
cloneMethod · 0.70

Calls 1

__nameFunction · 0.85

Tested by

no test coverage detected