aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2025-10-11 00:28:41 -0500
committerJP Dillingham <jp@dillingham.me>2025-10-11 00:28:41 -0500
commite1a39de7d5e8127a2a3b52ecc5d09bb4961c40e0 (patch)
treefd20ad5b3623593c3ef0c7651e0a6b3b7e4fbd5a
parentbaafe5f4b4454b985ee33d5ff2e9df6213667bc4 (diff)
downloadslskd-e1a39de7d5e8127a2a3b52ecc5d09bb4961c40e0.tar.gz
add transfer timeout setting
-rw-r--r--config/slskd.example.yml1
-rw-r--r--docs/config.md7
-rw-r--r--src/slskd/Core/Options.cs9
3 files changed, 16 insertions, 1 deletions
diff --git a/config/slskd.example.yml b/config/slskd.example.yml
index ad3c6113..419c0c9f 100644
--- a/config/slskd.example.yml
+++ b/config/slskd.example.yml
@@ -207,6 +207,7 @@
# timeout:
# connect: 10000
# inactivity: 15000
+# transfer: 30000
# buffer:
# read: 16384
# write: 16384
diff --git a/docs/config.md b/docs/config.md
index 10f296f5..5a4d3155 100644
--- a/docs/config.md
+++ b/docs/config.md
@@ -705,10 +705,14 @@ Higher connect timeout values will help ensure that operations (browse, download
Inactivity timeouts help the application determine when a distributed parent connection has stopped sending data and when connections that have delivered search results (and are unlikely to be used further) from remaining open longer than needed. Reducing this timeout can help low spec systems if port exhaustion is a concern but may result in the application "hunting" for a distributed parent connection needlessly.
+Transfer connections use their own timeout value; other Soulseek clients regulate transfer speed by controlling how often data is sent (e.g. send full speed for 5 seconds, send nothing for 25 seconds),
+and as such transfers can easily time out due to inactivity if using a lower value. This setting must be at least 30 seconds.
+
| Command-Line | Environment Variable | Description |
| --------------------------- | ------------------------------- | ------------------------------------------------ |
| `--slsk-connection-timeout` | `SLSKD_SLSK_CONNECTION_TIMEOUT` | The connection timeout value, in milliseconds |
| `--slsk-inactivity-timeout` | `SLSKD_SLSK_INACTIVITY_TIMEOUT` | The connection inactivity value, in milliseconds |
+| `--slsk-transfer-timeout` | `SLSKD_SLSK_TRANSFER_TIMEOUT` | The transfer connection timeout value, in milliseconds |
#### **YAML**
```yaml
@@ -716,7 +720,8 @@ soulseek:
connection:
timeout:
connect: 10000
- inactivity: 15000
+ inactivity: 15000
+ transfer: 30000
```
### Buffers
diff --git a/src/slskd/Core/Options.cs b/src/slskd/Core/Options.cs
index 352d23e9..38416ca2 100644
--- a/src/slskd/Core/Options.cs
+++ b/src/slskd/Core/Options.cs
@@ -1675,6 +1675,15 @@ namespace slskd
[Description("connection inactivity timeout, in milliseconds")]
[Range(1000, int.MaxValue)]
public int Inactivity { get; init; } = 15000;
+
+ /// <summary>
+ /// Gets the transfer connection timeout, in milliseconds.
+ /// </summary>
+ [Argument(default, "slsk-transfer-timeout")]
+ [EnvironmentVariable("SLSK_TRANSFER_TIMEOUT")]
+ [Description("transfer connection timeout, in milliseconds")]
+ [Range(30_000, int.MaxValue)]
+ public int Transfer { get; init; } = 60000;
}
/// <summary>