From 62d9bff06b41cf70bc2a2a3129f81e24baa11313 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 3 Jun 2010 11:01:47 -0700 Subject: [PATCH] Fix ability to disable TCP timeouts with setTimeout(0) --- lib/net.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/net.js b/lib/net.js index c8eb6701c41..fd825dad7fb 100644 --- a/lib/net.js +++ b/lib/net.js @@ -937,6 +937,8 @@ Stream.prototype.setTimeout = function (msecs) { if (msecs > 0) { timeout.enroll(this, msecs); if (this.fd) { timeout.active(this); } + } else if (msecs === 0) { + timeout.unenroll(this); } };