mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-04 00:36:14 +00:00
THeartbeatThread: remove second try to heartbeat url
This commit is contained in:
parent
f4ffa2cdda
commit
c0faff5b05
@ -40,22 +40,17 @@ void THeartbeatThread::operator()() {
|
|||||||
|
|
||||||
if (T.substr(0, 2) != "20") {
|
if (T.substr(0, 2) != "20") {
|
||||||
//Backend system refused server startup!
|
//Backend system refused server startup!
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
warn("Backend system refused server! Server might not show in the public list");
|
||||||
T = Http::POST(Application::GetBackendHostname(), Target, {}, Body, false);
|
debug("server returned \"" + T + "\"");
|
||||||
// TODO backup2 + HTTP flag (no TSL)
|
if (T.size() > std::string("YOU_SHALL_NOT_PASS").size()
|
||||||
if (T.substr(0, 2) != "20") {
|
&& Application::Settings.Key.size() == 36) {
|
||||||
warn("Backend system refused server! Server might not show in the public list");
|
auto Lock = Sentry.CreateExclusiveContext();
|
||||||
debug("server returned \"" + T + "\"");
|
Sentry.AddExtra("response-body", T);
|
||||||
if (T.size() > std::string("YOU_SHALL_NOT_PASS").size()
|
Sentry.AddExtra("request-body", Body);
|
||||||
&& Application::Settings.Key.size() == 36) {
|
Sentry.SetTransaction(Application::GetBackendHostname() + Target);
|
||||||
auto Lock = Sentry.CreateExclusiveContext();
|
Sentry.Log(SENTRY_LEVEL_ERROR, "default", "wrong backend response format");
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
isAuth = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isAuth) {
|
if (!isAuth) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user