From 849792e46b36297b63e3424e4b2e183dd9f1d76f Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 18 Nov 2010 12:04:33 -0800 Subject: [PATCH] Add todo about test-pipe.js and throwing on resume() --- lib/net.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/net.js b/lib/net.js index 50cfc293cd1..62abffdaf53 100644 --- a/lib/net.js +++ b/lib/net.js @@ -538,7 +538,11 @@ Stream.prototype.pause = function () { Stream.prototype.resume = function () { - if (this.fd === null) throw new Error('Cannot resume() closed Stream.'); + if (this.fd === null) { + // TODO, FIXME: throwing here breaks test/simple/test-pipe.js + // throw new Error('Cannot resume() closed Stream.'); + return; + } this._readWatcher.stop(); this._readWatcher.set(this.fd, true, false); this._readWatcher.start();