(req, res)
| 1 | export function isConnectionDropped(req, res) { |
| 2 | // Have the flags been set for: |
| 3 | // - a global request timeout (via the express-timeout-handler middleware)? |
| 4 | // - an aborted request connection (via Node.js core's HTTP IncomingMessage)? |
| 5 | return Boolean(res.globalTimeout || req.aborted) |
| 6 | } |
| 7 | |
| 8 | export function haltOnDroppedConnection(req, res, next) { |
| 9 | // Only proceed if the flag has not been set for the express-timeout-handler middleware |
no outgoing calls
no test coverage detected