From ec1589875ce31ebd7a230aa5865f56cffb547e95 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Wed, 1 Dec 2010 12:52:31 -0800 Subject: [PATCH] Stop watcher before calling .set() in Stream.prototype.resume --- lib/net.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/net.js b/lib/net.js index c5a779a34e5..20907532b33 100644 --- a/lib/net.js +++ b/lib/net.js @@ -641,6 +641,7 @@ Stream.prototype.pause = function () { Stream.prototype.resume = function () { if (this.fd === null) throw new Error('Cannot resume() closed Stream.'); + this._readWatcher.stop(); this._readWatcher.set(this.fd, true, false); this._readWatcher.start(); };