From a5c94ba8005bf8a83a2d1f0181909452c4088c45 Mon Sep 17 00:00:00 2001 From: rjindael Date: Tue, 1 Aug 2023 21:28:25 -0700 Subject: [PATCH] fix(web): fix infinite loop T_T --- Kiseki.Launcher/Web.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Kiseki.Launcher/Web.cs b/Kiseki.Launcher/Web.cs index 96c19ba..e2922da 100644 --- a/Kiseki.Launcher/Web.cs +++ b/Kiseki.Launcher/Web.cs @@ -15,9 +15,12 @@ namespace Kiseki.Launcher public static readonly HttpClient HttpClient = new(); public static string CurrentUrl { get; private set; } = ""; - public static bool Initialize() + public static bool Initialize(bool setBaseUrl = true) { - CurrentUrl = BASE_URL; + if (setBaseUrl) + { + CurrentUrl = BASE_URL; + } int response = CheckHealth(); @@ -26,7 +29,7 @@ namespace Kiseki.Launcher if (response == RESPONSE_MAINTENANCE) { CurrentUrl = $"{MAINTENANCE_DOMAIN}.{BASE_URL}"; - return Initialize(); + return Initialize(false); } return false;