(request)
| 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(); |
no test coverage detected