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

Method terminate

deps/undici/undici.js:13456–13463  ·  view source on GitHub ↗
(reason)

Source from the content-addressed store, hash-verified

13454 this.state = "ongoing";
13455 }
13456 terminate(reason) {
13457 if (this.state !== "ongoing") {
13458 return;
13459 }
13460 this.state = "terminated";
13461 this.connection?.destroy(reason);
13462 this.emit("terminated", reason);
13463 }
13464 // https://fetch.spec.whatwg.org/#fetch-controller-abort
13465 abort(error) {
13466 if (this.state !== "ongoing") {

Calls 2

destroyMethod · 0.45
emitMethod · 0.45

Tested by

no test coverage detected