Browse files

searching for events that should cancel the timeout

  • Loading branch information...
1 parent e7b746f commit 799de713551ac562c7518f042f238a9c31cbf12d Hunter Loftis committed Mar 4, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/middleware/timeout.js
View
2 lib/middleware/timeout.js
@@ -43,6 +43,8 @@ module.exports = function timeout(options) {
req.socket.setTimeout(0);
};
+ req.socket.on('close', req.clearTimeout);
+
return next();
};
};

0 comments on commit 799de71

Please sign in to comment.