Skip to content

Commit

Permalink
Fix: Application deadlock when starting add-on installation externally
Browse files Browse the repository at this point in the history
  • Loading branch information
JosefNemec committed Dec 29, 2021
1 parent 49cbcd6 commit 47e5c2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/Playnite/Common/Web/Downloader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public string DownloadString(string url, CancellationToken cancelToken)
using (var webClient = new WebClient { Encoding = Encoding.UTF8 })
using (var registration = cancelToken.Register(() => webClient.CancelAsync()))
{
return webClient.DownloadStringTaskAsync(url).GetAwaiter().GetResult();
return Task.Run(async () => await webClient.DownloadStringTaskAsync(url)).GetAwaiter().GetResult();
}
}
catch (WebException ex) when (ex.Status == WebExceptionStatus.RequestCanceled)
Expand Down

0 comments on commit 47e5c2f

Please sign in to comment.