From c0faff5b0589bd3bc06899ff3eb3ec38bf76a74b Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Tue, 10 Aug 2021 12:40:55 +0200 Subject: [PATCH] THeartbeatThread: remove second try to heartbeat url --- src/THeartbeatThread.cpp | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/src/THeartbeatThread.cpp b/src/THeartbeatThread.cpp index 1212ec1..575892d 100644 --- a/src/THeartbeatThread.cpp +++ b/src/THeartbeatThread.cpp @@ -40,22 +40,17 @@ void THeartbeatThread::operator()() { if (T.substr(0, 2) != "20") { //Backend system refused server startup! - std::this_thread::sleep_for(std::chrono::milliseconds(500)); - T = Http::POST(Application::GetBackendHostname(), Target, {}, Body, false); - // TODO backup2 + HTTP flag (no TSL) - if (T.substr(0, 2) != "20") { - warn("Backend system refused server! Server might not show in the public list"); - debug("server returned \"" + T + "\""); - if (T.size() > std::string("YOU_SHALL_NOT_PASS").size() - && Application::Settings.Key.size() == 36) { - auto Lock = Sentry.CreateExclusiveContext(); - Sentry.AddExtra("response-body", T); - Sentry.AddExtra("request-body", Body); - Sentry.SetTransaction(Application::GetBackendHostname() + Target); - Sentry.Log(SENTRY_LEVEL_ERROR, "default", "wrong backend response format"); - } - isAuth = false; + warn("Backend system refused server! Server might not show in the public list"); + debug("server returned \"" + T + "\""); + if (T.size() > std::string("YOU_SHALL_NOT_PASS").size() + && Application::Settings.Key.size() == 36) { + auto Lock = Sentry.CreateExclusiveContext(); + Sentry.AddExtra("response-body", T); + Sentry.AddExtra("request-body", Body); + Sentry.SetTransaction(Application::GetBackendHostname() + Target); + Sentry.Log(SENTRY_LEVEL_ERROR, "default", "wrong backend response format"); } + isAuth = false; } if (!isAuth) {