MCPcopy
hub / github.com/hapijs/hapi / autoValue

Function autoValue

test/transmit.js:412–423  ·  view source on GitHub ↗
(request)

Source from the content-addressed store, hash-verified

410
411 server.state('always', {
412 async autoValue(request) {
413
414 const close = new Teamwork.Team();
415 request.raw.res.once('close', () => close.attend());
416
417 // Will trigger abort then close. Prior to node v15.7.0 the res close came
418 // asynchronously after req abort, but since then it comes in the same tick.
419 client.destroy();
420 await close.work;
421
422 return team.work; // Continue marshalling once the request has been aborted and response closed.
423 }
424 });
425
426 await server.start();

Callers 1

headers.jsFile · 0.85

Calls 2

destroyMethod · 0.80
onceMethod · 0.65

Tested by

no test coverage detected