update: timeout to wait the result of downloading version info

This commit is contained in:
leo 2024-04-26 09:40:02 +08:00
parent 879f3cd76c
commit 49abab2903

View file

@ -164,7 +164,7 @@ namespace SourceGit
try try
{ {
// Fetch lastest release information. // Fetch lastest release information.
var client = new HttpClient() { Timeout = TimeSpan.FromSeconds(2) }; var client = new HttpClient() { Timeout = TimeSpan.FromSeconds(5) };
var data = await client.GetStringAsync("https://sourcegit-scm.github.io/data/version.json"); var data = await client.GetStringAsync("https://sourcegit-scm.github.io/data/version.json");
// Parse json into Models.Version. // Parse json into Models.Version.