Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

set needReadable flag when returning no bytes

Thanks, @TooTallNate
  • Loading branch information...
commit 97a9fffe087c2636db622696c814b9643dc76556 1 parent eeb890f
@isaacs isaacs authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 readable.js
View
4 readable.js
@@ -68,6 +68,10 @@ Readable.prototype.read = function(n) {
}
var ret = n > 0 ? fromList(n, state.buffer, state.length) : null;
+
+ if (ret === null || ret.length === 0)
+ state.needReadable = true;
+
state.length -= n;
if (!state.ended &&
Please sign in to comment.
Something went wrong with that request. Please try again.