Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Updated drain to fire only once (so we don't leak event listeners)

  • Loading branch information...
commit e45833acc8d4d58fe015c73652406376c2f55cd1 1 parent 3099468
authored

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  lib/middleware/timeout.js
2  lib/middleware/timeout.js
@@ -43,7 +43,7 @@ module.exports = function timeout(options) {
43 43
       req.socket.setTimeout(0);
44 44
     };
45 45
 
46  
-    req.socket.on('drain', req.clearTimeout); // Clear whenever we send anything
  46
+    req.socket.once('drain', req.clearTimeout); // Clear whenever we send anything
47 47
 
48 48
     return next();
49 49
   };

0 notes on commit e45833a

Please sign in to comment.
Something went wrong with that request. Please try again.