From ea806fcd8e6a4cc65605a93f22c4dbf8702ebd87 Mon Sep 17 00:00:00 2001 From: pizzaboxer Date: Wed, 11 Oct 2023 08:44:48 +0100 Subject: [PATCH] Check for HTTP 200 when checking deploy mirrors --- Bloxstrap/RobloxDeployment.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Bloxstrap/RobloxDeployment.cs b/Bloxstrap/RobloxDeployment.cs index cdeda88..5ce4b19 100644 --- a/Bloxstrap/RobloxDeployment.cs +++ b/Bloxstrap/RobloxDeployment.cs @@ -12,6 +12,7 @@ { "https://setup.rbxcdn.com", "https://setup-ak.rbxcdn.com", + "https://roblox-setup.cachefly.net", "https://s3.amazonaws.com/setup.roblox.com" }; @@ -32,7 +33,11 @@ try { - App.HttpClient.GetAsync($"{attemptedUrl}/version").Wait(); + var response = App.HttpClient.GetAsync($"{attemptedUrl}/version").Result; + + if (!response.IsSuccessStatusCode) + throw new HttpResponseException(response); + App.Logger.WriteLine(LOG_IDENT, "Connection successful!"); _baseUrl = attemptedUrl; break; @@ -46,7 +51,7 @@ } if (string.IsNullOrEmpty(_baseUrl)) - throw new Exception("Unable to find an accessible Roblox deploy mirror!"); + throw new Exception("Could not find an accessible Roblox deployment mirror, likely due to a bad internet connection. Please launch again."); } return _baseUrl;