Close requests moving too little instead of idle ones

Replace controller.transfer_idle_timeout with
controller.transfer_min_progress, the amount a request has to move
every 30 seconds, so a request trickled in is closed too. The check
now runs for every route.

Both ends of a proxy stream are judged on what the receiver has taken,
so a sender held back by a slow receiver is not closed.

Keep the limit on receiving headers, which turning off the request
timeout also turned off.
This commit is contained in:
Danielv123 committed 2026-11-13 22:59:12 +01:00
1 parent 49ddc9ebd1
commit b31983e30b
5 files changed
+229 -66

No files matched your search

+6 -6
View File
@@ -31,7 +31,7 @@ export interface ControllerConfigFields {
"controller.max_subscription_filters": number;
"controller.system_metrics_interval": number;
"controller.proxy_stream_timeout": number;
"controller.transfer_idle_timeout": number;
"controller.transfer_min_progress": number;
"controller.factorio_username": string | null;
"controller.factorio_token": string | null;
"controller.share_factorio_credentials_with_hosts": boolean;
@@ -216,12 +216,12 @@ export class ControllerConfig extends classes.Config<ControllerConfigFields> {
initialValue: 15,
validator: validators.greaterThanZero,
},
"controller.transfer_idle_timeout": {
title: "Transfer Idle Timeout",
description: "Time in seconds an upload or download can go without progress before it's closed.",
"controller.transfer_min_progress": {
title: "Transfer Minimum Progress",
description: "KiB an upload or download has to move every 30 seconds to not be closed, 0 for no limit.",
type: "number",
initialValue: 60,
validator: validators.greaterThanZero,
initialValue: 30,
validator: validators.greaterThanEqualZero,
},
"controller.session_timeout": {
title: "Session Timeout",