fix: fix blocking client download task

This commit is contained in:
rjindael 2023-08-02 18:37:49 -07:00
parent 8faf7ddfc5
commit 2cd2ff2da9
No known key found for this signature in database
GPG Key ID: D069369C906CCF31
1 changed files with 2 additions and 2 deletions

View File

@ -165,7 +165,7 @@ public class Bootstrapper : Interfaces.IBootstrapper
Directory.CreateDirectory(Path.Combine(Paths.Versions, Arguments["Version"]));
// Download archive
Task.WaitAny(Task.Factory.StartNew(() => {
Task.WaitAny(Task.Factory.StartNew(async () => {
using WebClient client = new();
bool finished = false;
@ -181,7 +181,7 @@ public class Bootstrapper : Interfaces.IBootstrapper
client.DownloadFileAsync(new Uri(clientRelease.Asset.Url), Path.Combine(Paths.Versions, Arguments["Version"], "archive.zip"));
while (!finished) Task.Delay(100);
while (!finished) await Task.Delay(100);
}));
// Compare archive checksum