Browse Source

stream: fix off-by-factor-16 error in comment

The high watermark is capped at 8 MB, not 128 MB like the comment
in lib/_stream_readable.js said.

PR-URL: https://github.com/nodejs/node/pull/2479
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
v4.0.0-rc
Ben Noordhuis 10 years ago
parent
commit
1a3f4a87b6
  1. 2
      lib/_stream_readable.js

2
lib/_stream_readable.js

@ -190,7 +190,7 @@ Readable.prototype.setEncoding = function(enc) {
return this;
};
// Don't raise the hwm > 128MB
// Don't raise the hwm > 8MB
const MAX_HWM = 0x800000;
function roundUpToNextPowerOf2(n) {
if (n >= MAX_HWM) {

Loading…
Cancel
Save