bandwidth-throttle-stream
bandwidth-throttle-stream copied to clipboard
When I try to use the throttle I get Maximum call stack size exceeded
I cereate the file varuable via createReadStream. It is working normally without the throtling.
const bandwidthThrottleGroup = createBandwidthThrottleGroup({
bytesPerSecond: rate
});
const throttle = bandwidthThrottleGroup.createBandwidthThrottle(item.meta.fileSize);
file
.pipe(throttle)
.pipe(writable)
and then when I try to limit the bandwidth I get this error
RangeError: Maximum call stack size exceeded
at Array.push (<anonymous>)
at getFrequencyPerDivision (****\node_modules\bandwidth-throttle-stream\src\Util\evenlyDistributeSets.ts:91:17)
at getFrequencyPerDivision (****\node_modules\bandwidth-throttle-stream\src\Util\evenlyDistributeSets.ts:99:12)
at getFrequencyPerDivision (****\node_modules\bandwidth-throttle-stream\src\Util\evenlyDistributeSets.ts:99:12)
at getFrequencyPerDivision (****\node_modules\bandwidth-throttle-stream\src\Util\evenlyDistributeSets.ts:99:12)
at getFrequencyPerDivision (****\node_modules\bandwidth-throttle-stream\src\Util\evenlyDistributeSets.ts:99:12)
at getFrequencyPerDivision (****\node_modules\bandwidth-throttle-stream\src\Util\evenlyDistributeSets.ts:99:12)
at getFrequencyPerDivision (****\node_modules\bandwidth-throttle-stream\src\Util\evenlyDistributeSets.ts:99:12)
at getFrequencyPerDivision (****\node_modules\bandwidth-throttle-stream\src\Util\evenlyDistributeSets.ts:99:12)
at getFrequencyPerDivision (****\node_modules\bandwidth-throttle-stream\src\Util\evenlyDistributeSets.ts:99:12)