projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
639fbe2
)
streams2: Set flowing=true when flowing
author
isaacs
<i@izs.me>
Thu, 4 Oct 2012 00:43:27 +0000
(17:43 -0700)
committer
isaacs
<i@izs.me>
Fri, 14 Dec 2012 01:00:24 +0000
(17:00 -0800)
lib/_stream_readable.js
patch
|
blob
|
history
diff --git
a/lib/_stream_readable.js
b/lib/_stream_readable.js
index
b71c22a
..
7b2d76c
100644
(file)
--- a/
lib/_stream_readable.js
+++ b/
lib/_stream_readable.js
@@
-159,8
+159,10
@@
Readable.prototype.pipe = function(dest, pipeOpts) {
dest.emit('pipe', src);
// start the flow.
- if (!state.flowing)
+ if (!state.flowing) {
+ state.flowing = true;
process.nextTick(flow.bind(null, src, pipeOpts));
+ }
return dest;
};
@@
-168,7
+170,6
@@
Readable.prototype.pipe = function(dest, pipeOpts) {
function flow(src, pipeOpts) {
var state = src._readableState;
var chunk;
- var dest;
var needDrain = 0;
function ondrain() {