readable-stream
Advanced tools
Comparing version 2.0.3 to 2.0.4
@@ -553,2 +553,3 @@ 'use strict'; | ||
var cleanedUp = false; | ||
function cleanup() { | ||
@@ -566,2 +567,4 @@ debug('cleanup'); | ||
cleanedUp = true; | ||
// if the reader is waiting for a drain event from this | ||
@@ -582,5 +585,12 @@ // specific writer, then it would cause it to never start | ||
if (false === ret) { | ||
debug('false write response, pause', | ||
src._readableState.awaitDrain); | ||
src._readableState.awaitDrain++; | ||
// If the user unpiped during `dest.write()`, it is possible | ||
// to get stuck in a permanently paused state if that write | ||
// also returned false. | ||
if (state.pipesCount === 1 && | ||
state.pipes[0] === dest && | ||
src.listenerCount('data') === 1 && | ||
!cleanedUp) { | ||
debug('false write response, pause', src._readableState.awaitDrain); | ||
src._readableState.awaitDrain++; | ||
} | ||
src.pause(); | ||
@@ -885,2 +895,4 @@ } | ||
ret = list.join(''); | ||
else if (list.length === 1) | ||
ret = list[0]; | ||
else | ||
@@ -887,0 +899,0 @@ ret = Buffer.concat(list, length); |
// A bit simpler than readable streams. | ||
// Implement an async ._write(chunk, cb), and it'll handle all | ||
// Implement an async ._write(chunk, encoding, cb), and it'll handle all | ||
// the drain event emission and buffering. | ||
@@ -4,0 +4,0 @@ |
{ | ||
"name": "readable-stream", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"description": "Streams3, a user-land copy of the stream library from iojs v2.x", | ||
@@ -5,0 +5,0 @@ "main": "readable.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
112304
1497