summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChristopher Jeffrey <chjjeffrey@gmail.com>2012-02-02 00:44:22 -0600
committerBen Noordhuis <info@bnoordhuis.nl>2012-02-04 22:14:58 +0100
commitf64989e63b9cf11c88e46b422de6234fc4699039 (patch)
treefe2796da12b004f909d3eb98dd97d6248c561661 /lib
parent07a983a6025cf788df2e2371e96924ffe8602e08 (diff)
downloadnode-f64989e63b9cf11c88e46b422de6234fc4699039.tar.gz
fs: fix ReadStream fails to read from existing fd
A ReadStream constructed from an existing file descriptor failed to start reading automatically. Avoids a userspace call to ReadStream.prototype._read().
Diffstat (limited to 'lib')
-rw-r--r--lib/fs.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/fs.js b/lib/fs.js
index 7b61c8984..3603232ab 100644
--- a/lib/fs.js
+++ b/lib/fs.js
@@ -1050,6 +1050,7 @@ var ReadStream = fs.ReadStream = function(path, options) {
}
if (this.fd !== null) {
+ this._read();
return;
}