aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2026-04-26 19:21:34 -0500
committerJP Dillingham <jp@dillingham.me>2026-04-26 19:21:34 -0500
commit96fda39aeb290524c00a24846c448bdfd2527663 (patch)
tree7e2a7722d8a46d49837e6dc7c145a606f25541ec /src/slskd
parentda6c14ad62fc201eaf7c24470b5da972dd861ace (diff)
downloadslskd-96fda39aeb290524c00a24846c448bdfd2527663.tar.gz
prevent downloads from transitioning into terminal state while retries are available (but not if the Soulseek.NET transfer is not dead)
Diffstat (limited to 'src/slskd')
-rw-r--r--src/slskd/Transfers/Downloads/DownloadService.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/slskd/Transfers/Downloads/DownloadService.cs b/src/slskd/Transfers/Downloads/DownloadService.cs
index d4d8004a..0ccf52c3 100644
--- a/src/slskd/Transfers/Downloads/DownloadService.cs
+++ b/src/slskd/Transfers/Downloads/DownloadService.cs
@@ -973,9 +973,11 @@ namespace slskd.Transfers.Downloads
// the final update after all retry attempts have been exhausted to add it.
// this means that the ONLY way to check whether a transfer is really 'dead' inclusive of all
// retries is to look for this flag
- if (transfer.Attempts < retryOptions.Attempts)
+ if (args.Transfer.State.HasFlag(TransferStates.Completed)
+ && !args.Transfer.State.HasFlag(TransferStates.Succeeded)
+ && transfer.Attempts < retryOptions.Attempts)
{
- transfer.State &= ~TransferStates.Completed; // remove the Completed flag
+ transfer.State = TransferStates.Queued | TransferStates.Locally;
}
// todo: broadcast