From d05e979eded88150d9fc320543023fef8b6c9480 Mon Sep 17 00:00:00 2001 From: zznty <94796179+zznty@users.noreply.github.com> Date: Sun, 8 May 2022 12:25:06 +0700 Subject: [PATCH] remove unnecessary async lambda --- Torch.Server/Views/PluginDownloader.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Torch.Server/Views/PluginDownloader.xaml.cs b/Torch.Server/Views/PluginDownloader.xaml.cs index ecdb8b0..00faac3 100644 --- a/Torch.Server/Views/PluginDownloader.xaml.cs +++ b/Torch.Server/Views/PluginDownloader.xaml.cs @@ -50,7 +50,7 @@ namespace Torch.Server.Views var PercentChangeOnDownload = 100 / PluginsToDownload.Count; foreach (PluginItem PluginItem in PluginsToDownload) { - if (!Task.Run(async () => await PluginQuery.Instance.DownloadPlugin(PluginItem.Id)).Result) { + if (!PluginQuery.Instance.DownloadPlugin(PluginItem.Id).Result) { failedDownloads++; DownloadProgress += PercentChangeOnDownload; (sender as BackgroundWorker).ReportProgress(DownloadProgress);