diff options
author | Iskren Ivov Chernev <iskren.chernev@gmail.com> | 2013-03-19 21:58:18 +0400 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2013-03-20 03:34:31 +0400 |
commit | 2f4a62c5e13ed7ebe608fc7c861b0bd600401537 (patch) | |
tree | e3105965eb8a9c1bc6b0985c5536b3418c460afe /doc | |
parent | bf83251eea0060f1c153a5bf46f063692bcc8aea (diff) |
doc: fix streams2 SimpleProtocol example
A non-existing variable `b` was used to queue data for reading.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/stream.markdown | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/api/stream.markdown b/doc/api/stream.markdown index d4e56245958..2c9fc1c6c4c 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(); }; |