From db511929cd608d3ed4cc72e6eaf07b2a1a79e555 Mon Sep 17 00:00:00 2001 From: omgbeez <251408589+omgbeez@users.noreply.github.com> Date: Fri, 20 Feb 2026 16:13:25 -0500 Subject: [PATCH] Addressing bug from qodo review --- server/RdtClient.Service/Services/DownloadClient.cs | 1 + server/RdtClient.Service/Services/TorrentRunner.cs | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/server/RdtClient.Service/Services/DownloadClient.cs b/server/RdtClient.Service/Services/DownloadClient.cs index 6b68c70..fde9048 100644 --- a/server/RdtClient.Service/Services/DownloadClient.cs +++ b/server/RdtClient.Service/Services/DownloadClient.cs @@ -102,6 +102,7 @@ public class DownloadClient(Download download, Torrent torrent, String destinati await Downloader.Cancel(); } + Error = ex.Message; Finished = true; throw new($"An unexpected error occurred preparing download {download.Link} for torrent {torrent.RdName}: {ex.Message}"); diff --git a/server/RdtClient.Service/Services/TorrentRunner.cs b/server/RdtClient.Service/Services/TorrentRunner.cs index 78cdbc5..82389d8 100644 --- a/server/RdtClient.Service/Services/TorrentRunner.cs +++ b/server/RdtClient.Service/Services/TorrentRunner.cs @@ -544,9 +544,7 @@ public class TorrentRunner(ILogger logger, Torrents torrents, Dow catch (Exception ex) { LogError($"Unable to start download: {ex.Message}", download, torrent); - - await downloads.UpdateError(download.DownloadId, ex.Message); - await downloads.UpdateCompleted(download.DownloadId, DateTimeOffset.UtcNow); + continue; } Log($"Started download", download, torrent);