Browse Source

doc: correct comment error in stream.md

Fix comment about remove listener (not setting)

PR-URL: https://github.com/nodejs/node/pull/11804
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
v6
Alexander 8 years ago
committed by James M Snell
parent
commit
8b03221b28
  1. 2
      doc/api/stream.md

2
doc/api/stream.md

@ -1016,7 +1016,7 @@ function parseHeader(stream, callback) {
const remaining = split.join('\n\n');
const buf = Buffer.from(remaining, 'utf8');
stream.removeListener('error', callback);
// set the readable listener before unshifting
// remove the readable listener before unshifting
stream.removeListener('readable', onReadable);
if (buf.length)
stream.unshift(buf);

Loading…
Cancel
Save