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

Function cancelAlgorithm

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

isCancelledFunction · 0.85
abortMethod · 0.65

Tested by

no test coverage detected