THeartbeatThread: fix missing response code

This commit is contained in:
Lion Kortlepel 2021-08-11 23:19:06 +02:00 committed by Lion
parent 4b92532203
commit a2dc42c5f5

View File

@ -54,11 +54,11 @@ void THeartbeatThread::operator()() {
SentryReportError(Application::GetBackendHostname() + Target);
std::this_thread::sleep_for(std::chrono::milliseconds(500));
T = Http::POST(Application::GetBackup1Hostname(), Target, {}, Body, false);
T = Http::POST(Application::GetBackup1Hostname(), Target, {}, Body, false, &ResponseCode);
if (T.substr(0, 2) != "20") {
SentryReportError(Application::GetBackup1Hostname() + Target);
std::this_thread::sleep_for(std::chrono::milliseconds(500));
T = Http::POST(Application::GetBackup2Hostname(), Target, {}, Body, false);
T = Http::POST(Application::GetBackup2Hostname(), Target, {}, Body, false, &ResponseCode);
if (T.substr(0, 2) != "20") {
warn("Backend system refused server! Server might not show in the public list");
isAuth = false;