From b4f57596898948606d014dda6f7531d0567a5b63 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sat, 18 Oct 2025 17:34:20 -0500 Subject: don't swallow relay errors --- src/slskd/Transfers/Downloads/DownloadService.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/slskd/Transfers/Downloads/DownloadService.cs b/src/slskd/Transfers/Downloads/DownloadService.cs index efa5d644..9beb8077 100644 --- a/src/slskd/Transfers/Downloads/DownloadService.cs +++ b/src/slskd/Transfers/Downloads/DownloadService.cs @@ -385,16 +385,16 @@ namespace slskd.Transfers.Downloads Log.Debug("Moved file {Filename} to {Destination}", transfer.Filename, finalFilename); - try + if (OptionsMonitor.CurrentValue.Relay.Enabled) { - Log.Debug("Running post-download logic for {Filename} from {Username}", transfer.Filename, transfer.Username); + _ = Relay.NotifyFileDownloadCompleteAsync(finalFilename); + } + try + { // begin post-processing tasks; the file is downloaded, it has been removed from the client's download dictionary, // and the file has been moved from the incomplete directory to the downloads directory - if (OptionsMonitor.CurrentValue.Relay.Enabled) - { - _ = Relay.NotifyFileDownloadCompleteAsync(finalFilename); - } + Log.Debug("Running post-download logic for {Filename} from {Username}", transfer.Filename, transfer.Username); EventBus.Raise(new DownloadFileCompleteEvent { -- cgit v1.2.3