From 2f4a62c5e13ed7ebe608fc7c861b0bd600401537 Mon Sep 17 00:00:00 2001 From: Iskren Ivov Chernev Date: Tue, 19 Mar 2013 10:58:18 -0700 Subject: [PATCH] doc: fix streams2 SimpleProtocol example A non-existing variable `b` was used to queue data for reading. --- doc/api/stream.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/stream.markdown b/doc/api/stream.markdown index d4e5624595..2c9fc1c6c4 100644 --- a/doc/api/stream.markdown +++ b/doc/api/stream.markdown @@ -717,11 +717,11 @@ SimpleProtocol.prototype._transform = function(chunk, encoding, done) { this.emit('header', this.header); // now, because we got some extra data, emit this first. - this.push(b); + this.push(chunk.slice(split)); } } else { // from there on, just provide the data to our consumer as-is. - this.push(b); + this.push(chunk); } done(); };