mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2026-03-11 18:05:32 +00:00
add offline update server catch branch
This commit is contained in:
parent
99feaafbe6
commit
f556e8b8fb
1 changed files with 7 additions and 0 deletions
|
|
@ -7,6 +7,7 @@ using Ryujinx.Common.Logging;
|
||||||
using Ryujinx.Systems.Update.Client;
|
using Ryujinx.Systems.Update.Client;
|
||||||
using Ryujinx.Systems.Update.Common;
|
using Ryujinx.Systems.Update.Common;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Net;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
|
@ -46,6 +47,12 @@ namespace Ryujinx.Ava.Systems
|
||||||
return Return<VersionResponse>.Failure(
|
return Return<VersionResponse>.Failure(
|
||||||
new MessageError("DNS resolution error occurred. Is your internet down?"));
|
new MessageError("DNS resolution error occurred. Is your internet down?"));
|
||||||
}
|
}
|
||||||
|
catch (HttpRequestException hre)
|
||||||
|
when (hre.StatusCode is HttpStatusCode.BadGateway)
|
||||||
|
{
|
||||||
|
return Return<VersionResponse>.Failure(
|
||||||
|
new MessageError("Could not connect to the update server, but it appears like you have internet. It seems like the update server is offline, try again later."));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async Task<Optional<(Version Current, Version Incoming)>> CheckVersionAsync(bool showVersionUpToDate = false)
|
public static async Task<Optional<(Version Current, Version Incoming)>> CheckVersionAsync(bool showVersionUpToDate = false)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue