Fix copy-throttling bug

This commit is contained in:
Javier Goizueta 2019-11-19 16:45:52 +01:00
parent 494f7f9bfb
commit 1e0ed7ee17

View File

@ -20,7 +20,7 @@ module.exports = class Throttler extends Transform {
this.bytesPerSecondHistory.push(this.byteCount); this.bytesPerSecondHistory.push(this.byteCount);
this.byteCount = 0; this.byteCount = 0;
if (this.bytesPerSecondHistory > this.sampleLength) { if (this.bytesPerSecondHistory.length > this.sampleLength) {
this.bytesPerSecondHistory.shift(); this.bytesPerSecondHistory.shift();
} }