readable-stream
Advanced tools
Comparing version 3.0.2 to 3.0.3
@@ -515,3 +515,3 @@ // Copyright Joyent, Inc. and other Node contributors. | ||
var state = stream._readableState; | ||
debug('emit readable'); | ||
debug('emitReadable_', state.destroyed, state.length, state.ended); | ||
if (!state.destroyed && (state.length || state.ended)) { | ||
@@ -771,2 +771,3 @@ stream.emit('readable'); | ||
state.readableListening = state.needReadable = true; | ||
state.flowing = false; | ||
state.emittedReadable = false; | ||
@@ -820,2 +821,7 @@ debug('on readable', state.length, state.reading); | ||
self._readableState.readableListening = self.listenerCount('readable') > 0; | ||
// crude way to check if we should resume | ||
if (self.listenerCount('data') > 0) { | ||
self.resume(); | ||
} | ||
} | ||
@@ -835,3 +841,4 @@ | ||
// we flow only if there is no one listening | ||
// for readable | ||
// for readable, but we still have to call | ||
// resume() | ||
state.flowing = !state.readableListening; | ||
@@ -838,0 +845,0 @@ resume(this, state); |
{ | ||
"name": "readable-stream", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"description": "Streams3, a user-land copy of the stream library from Node.js", | ||
"main": "readable.js", | ||
"engines": { | ||
"node": ">= 6" | ||
}, | ||
"dependencies": { | ||
@@ -7,0 +10,0 @@ "inherits": "^2.0.3", |
@@ -18,3 +18,3 @@ # readable-stream | ||
Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v10.9.0/docs/api/stream.html). | ||
Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v10.10.0/docs/api/stream.html). | ||
@@ -21,0 +21,0 @@ If you want to guarantee a stable streams base, regardless of what version of |
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
113827
2575