finalhandler+1.1.2.patch 470 B

12345678910111213
  1. diff --git a/node_modules/finalhandler/index.js b/node_modules/finalhandler/index.js
  2. index 5673507..40f4684 100644
  3. --- a/node_modules/finalhandler/index.js
  4. +++ b/node_modules/finalhandler/index.js
  5. @@ -125,7 +125,7 @@ function finalhandler (req, res, options) {
  6. // cannot actually respond
  7. if (headersSent(res)) {
  8. debug('cannot %d after headers sent', status)
  9. - req.socket.destroy()
  10. + if (req.socket) req.socket.destroy()
  11. return
  12. }