fix bug which caused updates to only check the first URL

This commit is contained in:
Lion Kortlepel 2022-09-26 12:04:42 +02:00
parent e638c25f70
commit ae517b30c0
No known key found for this signature in database
GPG Key ID: 4322FF2B4C71259B

View File

@ -198,7 +198,7 @@ void Application::CheckForUpdates() {
// checks current version against latest version // checks current version against latest version
std::regex VersionRegex { R"(\d+\.\d+\.\d+\n*)" }; std::regex VersionRegex { R"(\d+\.\d+\.\d+\n*)" };
for (const auto& url : GetBackendUrlsInOrder()) { for (const auto& url : GetBackendUrlsInOrder()) {
auto Response = Http::GET(GetBackendUrlsInOrder().at(0), 443, "/v/s"); auto Response = Http::GET(url, 443, "/v/s");
bool Matches = std::regex_match(Response, VersionRegex); bool Matches = std::regex_match(Response, VersionRegex);
if (Matches) { if (Matches) {
auto MyVersion = ServerVersion(); auto MyVersion = ServerVersion();