1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 10:52:53 +08:00

Merge pull request #3824 from peppy/fix-no-internet-crashes

Fix update code crashing when no internet connection is available
This commit is contained in:
Dan Balasescu 2018-12-06 15:28:13 +09:00 committed by GitHub
commit 6ffd2190bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,8 +40,11 @@ namespace osu.Desktop.Updater
}
private async void checkForUpdateAsync()
{
try
{
var releases = new JsonWebRequest<GitHubRelease>("https://api.github.com/repos/ppy/osu/releases/latest");
await releases.PerformAsync();
var latest = releases.ResponseObject;
@ -61,6 +64,11 @@ namespace osu.Desktop.Updater
});
}
}
catch
{
// we shouldn't crash on a web failure. or any failure for the matter.
}
}
private string getBestUrl(GitHubRelease release)
{