webtorrent / webtorrent

⚡️ Streaming torrent client for the web

Home Page:https://webtorrent.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Speed limiter (downloadLimit) not working @1.9.7

vankasteelj opened this issue · comments

What version of this package are you using?
1.9.7

What operating system, Node.js, and npm version?
Windows 11 x64, Node 20.1.0 (via NW.js) and npm 9.5.1

What happened?
Using opts.downloadLimit with a bytes/sec value does not throttle the download speeds. I've tried 3500000 (3,5Mb), 1000000 (1Mb), 10000 (10kb) or 1000 (1kb) doesnt do anything, it still downloads the torrent at somewhat maximum speeds (6 - 10 - 30mb/s depending on the available seeds)

What did you expect to happen?
For the download speeds to not go too high

Are you willing to submit a pull request to fix this bug?
No, I don't understand how ThrottleGroup works, but this patch on 0.108.x works flawlessly, I've taken it from here (an old never merged PR), maybe there's something there? (link: master...vankasteelj:webtorrent:master)

commented

can't reproduce on 2.1.3

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?