Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorIskren Ivov Chernev <iskren.chernev@gmail.com>2013-03-19 21:58:18 +0400
committerBen Noordhuis <info@bnoordhuis.nl>2013-03-20 03:34:31 +0400
commit2f4a62c5e13ed7ebe608fc7c861b0bd600401537 (patch)
treee3105965eb8a9c1bc6b0985c5536b3418c460afe /doc
parentbf83251eea0060f1c153a5bf46f063692bcc8aea (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.markdown4
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();
};