projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf83251
)
doc: fix streams2 SimpleProtocol example
author
Iskren Ivov Chernev
<iskren.chernev@gmail.com>
Tue, 19 Mar 2013 17:58:18 +0000
(10:58 -0700)
committer
Ben Noordhuis
<info@bnoordhuis.nl>
Tue, 19 Mar 2013 23:34:31 +0000
(
00:34
+0100)
A non-existing variable `b` was used to queue data for reading.
doc/api/stream.markdown
patch
|
blob
|
history
diff --git
a/doc/api/stream.markdown
b/doc/api/stream.markdown
index
d4e5624
..
2c9fc1c
100644
(file)
--- 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();
};