mirror of
https://github.com/nodejs/node.git
synced 2024-11-30 07:27:22 +01:00
Fix ability to disable TCP timeouts with setTimeout(0)
This commit is contained in:
parent
987cbe35c6
commit
62d9bff06b
@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user