Take a burst allowance off what a transfer check requires

controller.transfer_min_speed is now the speed that is never closed.
A check requires that speed over 60 s less 2 MiB, which covers the
bursts the OS sends data in, so at the default of 64 KiB/s the cutoff
is about 30 KiB/s. The requirement is at least 1 byte, so a transfer
that moved nothing is still closed at low settings.

The slow receiver test sends 16 MiB so that it spans real checks, and
two upload tests with set bursts cover the allowance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
bbassieandClaude Opus 5.5 committed 2026-11-20 22:13:51 +00:00
1 parent 42bc31e406
commit 2e273dc630
4 files changed
+81 -18

No files matched your search

+5 -4
View File
@@ -243,13 +243,14 @@ Defaults to 15.
### controller.transfer_min_speed
Speed in KiB/s a request to the controller has to move at, measured over 60 seconds, requests moving slower are closed.
Speed in KiB/s at which a request to the controller is never closed for moving too slowly.
This closes uploads and downloads that have stalled or are sent too slowly to ever finish, while there is no limit on how long a transfer making progress can take.
It applies to saves, mods and exports uploaded to the controller, proxy streams through it, and the body of any other request.
Time spent waiting for a proxy stream to start is not counted, see controller.proxy_stream_timeout.
Setting it lower than the default is not recommended.
Downloads through a proxy stream are measured on what the controller has handed to the OS.
The OS can buffer a couple of MiB per connection and only accepts more once a large part of that has been sent, so at lower values a download that keeps moving can go 60 seconds without the controller passing anything on and be closed.
Requests are checked every 60 seconds and must have moved this speed times 60 seconds, less 2 MiB, since the last check.
The 2 MiB covers the OS sending data in bursts, it can buffer a couple of MiB per connection and only accept more once a large part of that has gone out.
So at the default a request moving slower than about 30 KiB/s is closed, and one moving between that and 64 KiB/s may be.
Set below about 34 KiB/s, only requests that moved nothing in 60 seconds are closed.
Set to 0 for no limit.
Must be 0 or greater.