diff options
| author | JP Dillingham <jp@dillingham.me> | 2025-10-18 17:34:20 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2025-10-18 17:34:20 -0500 |
| commit | b4f57596898948606d014dda6f7531d0567a5b63 (patch) | |
| tree | e36179c65f39c59c719297921c362afa7cb89b95 /src | |
| parent | 9793dcd8313a02c071b6553bd608221ba0ec41c6 (diff) | |
| download | slskd-b4f57596898948606d014dda6f7531d0567a5b63.tar.gz | |
don't swallow relay errors
Diffstat (limited to 'src')
| -rw-r--r-- | src/slskd/Transfers/Downloads/DownloadService.cs | 12 |
1 files changed, 6 insertions, 6 deletions
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 { |
