MCPcopy Create free account
hub / github.com/nodejs/undici / cancelAlgorithm

Function cancelAlgorithm

lib/web/fetch/index.js:2032–2038  ·  view source on GitHub ↗
(reason)

Source from the content-addressed store, hash-verified

2030 // 12. Let cancelAlgorithm be an algorithm that aborts fetchParams’s
2031 // controller with reason, given reason.
2032 const cancelAlgorithm = (reason) => {
2033 // If the aborted fetch was already terminated, then we do not
2034 // need to do anything.
2035 if (!isCancelled(fetchParams)) {
2036 fetchParams.controller.abort(reason)
2037 }
2038 }
2039
2040 // 13. Let highWaterMark be a non-negative, non-NaN number, chosen by
2041 // the user agent.

Callers

nothing calls this directly

Calls 2

isCancelledFunction · 0.85
abortMethod · 0.65

Tested by

no test coverage detected