Fix connection detection

This commit is contained in:
SM9CC 2021-12-01 01:47:28 +00:00
parent 20081d9828
commit db972aaca7
No known key found for this signature in database
GPG Key ID: 497769F3F5AD3A35

View File

@ -21,7 +21,7 @@ static constexpr std::int32_t CONNECTION_TIMEOUT = 15;
bool is_connected() noexcept {
/* clang-format off */
auto r = cpr::Get(cpr::Url{"https://www.google.com"},
auto r = cpr::Get(cpr::Url{"google.com"},
cpr::Timeout{1000});
/* clang-format on */
return cpr::status::is_success(static_cast<std::int32_t>(r.status_code));