rework service disposal

This commit is contained in:
rootdarkarchon
2023-01-31 19:52:12 +01:00
parent ef5e77017f
commit 2ca3e639b4
24 changed files with 299 additions and 265 deletions

View File

@@ -186,7 +186,7 @@ public partial class ApiController
public async Task DownloadFiles(int currentDownloadId, List<FileReplacementData> fileReplacementDto, CancellationToken ct)
{
_mediator.Publish(new HaltScanMessage("Download"));
Mediator.Publish(new HaltScanMessage("Download"));
try
{
await DownloadFilesInternal(currentDownloadId, fileReplacementDto, ct).ConfigureAwait(false);
@@ -197,7 +197,7 @@ public partial class ApiController
}
finally
{
_mediator.Publish(new ResumeScanMessage("Download"));
Mediator.Publish(new ResumeScanMessage("Download"));
}
}