mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Check for HTTP 200 when checking deploy mirrors
This commit is contained in:
parent
197429dbf9
commit
ea806fcd8e
@ -12,6 +12,7 @@
|
|||||||
{
|
{
|
||||||
"https://setup.rbxcdn.com",
|
"https://setup.rbxcdn.com",
|
||||||
"https://setup-ak.rbxcdn.com",
|
"https://setup-ak.rbxcdn.com",
|
||||||
|
"https://roblox-setup.cachefly.net",
|
||||||
"https://s3.amazonaws.com/setup.roblox.com"
|
"https://s3.amazonaws.com/setup.roblox.com"
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -32,7 +33,11 @@
|
|||||||
|
|
||||||
try
|
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!");
|
App.Logger.WriteLine(LOG_IDENT, "Connection successful!");
|
||||||
_baseUrl = attemptedUrl;
|
_baseUrl = attemptedUrl;
|
||||||
break;
|
break;
|
||||||
@ -46,7 +51,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(_baseUrl))
|
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;
|
return _baseUrl;
|
||||||
|
Loading…
Reference in New Issue
Block a user