MCPcopy
hub / github.com/nodejs/undici / activeConnectionController

Function activeConnectionController

test/retry-handler-controller-proxy.js:22–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20// Stand-in for the per-dispatch RequestController of an active connection. It
21// records the flow-control calls the proxy forwards to it.
22function activeConnectionController () {
23 const calls = []
24 return {
25 calls,
26 paused: true,
27 aborted: true,
28 reason: new Error('boom'),
29 rawHeaders: ['content-length', '2'],
30 rawTrailers: ['x-trailer', 'value'],
31 pause () { calls.push('pause') },
32 resume () { calls.push('resume') },
33 abort (reason) { calls.push(['abort', reason]) }
34 }
35}
36
37test('controller proxy returns safe defaults and is a no-op before a connection is active', (t) => {
38 t = tspl(t, { plan: 6 })

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…