function isRequestDestroyed(req) {
  return !!(
    req.destroyed === true ||
    req.aborted ||
    (req.socket && req.socket.destroyed)
  )
}
Check if the Client Request has been cancelled.

Until Node 14 is the minimum, we need to look at both flags to see if the request has been cancelled.
The two flags have the same purpose, but the Node maintainers are migrating from `abort(ed)` to
`destroy(ed)` terminology, to be more consistent with `stream.Writable`.
In Node 14.x+, Calling `abort()` will set both `aborted` and `destroyed` to true, however,
calling `destroy()` will only set `destroyed` to true.
Falling back on checking if the socket is destroyed to cover the case of Node <14.x where
`destroy()` is called, but `destroyed` is undefined.

Node Client Request history:
- `request.abort()`: Added in: v0.3.8, Deprecated since: v14.1.0, v13.14.0
- `request.aborted`: Added in: v0.11.14, Became a boolean instead of a timestamp: v11.0.0, Not deprecated (yet)
- `request.destroy()`: Added in: v0.3.0
- `request.destroyed`: Added in: v14.1.0, v13.14.0

@param {ClientRequest} req
@returns {boolean}