diff options
| -rw-r--r-- | config/slskd.example.yml | 1 | ||||
| -rw-r--r-- | docs/config.md | 7 | ||||
| -rw-r--r-- | src/slskd/Core/Options.cs | 9 |
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> |
