diff options
| author | JP Dillingham <jp@dillingham.me> | 2026-04-26 19:21:34 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2026-04-26 19:21:34 -0500 |
| commit | 96fda39aeb290524c00a24846c448bdfd2527663 (patch) | |
| tree | 7e2a7722d8a46d49837e6dc7c145a606f25541ec /src | |
| parent | da6c14ad62fc201eaf7c24470b5da972dd861ace (diff) | |
| download | slskd-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')
| -rw-r--r-- | src/slskd/Transfers/Downloads/DownloadService.cs | 6 |
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 |
