mirror of
https://github.com/SantaSpeen/BeamMP-Server.git
synced 2025-07-03 04:55:25 +00:00
Sentry: Fix compile error in AssertNotReachable, release version
This commit is contained in:
parent
c4b72be50a
commit
0f9a994c10
@ -66,11 +66,8 @@ inline void _assert([[maybe_unused]] const char* file, [[maybe_unused]] const ch
|
||||
Sentry.LogAssert(#cond, _file_basename, _line, __func__); \
|
||||
} \
|
||||
} while (false)
|
||||
#define AssertNotReachable() \
|
||||
do { \
|
||||
bool result = (cond); \
|
||||
if (!result) { \
|
||||
Sentry.LogAssert("code is unreachable", _file_basename, _line, __func__); \
|
||||
} \
|
||||
#define AssertNotReachable() \
|
||||
do { \
|
||||
Sentry.LogAssert("code is unreachable", _file_basename, _line, __func__); \
|
||||
} while (false)
|
||||
#endif // DEBUG
|
||||
|
@ -40,7 +40,6 @@ void THeartbeatThread::operator()() {
|
||||
T = Http::POST(Application::GetBackendHostname(), Target, {}, Body, false, &ResponseCode);
|
||||
|
||||
if (T.substr(0, 2) != "20" || ResponseCode != 200) {
|
||||
debug("response: " + T);
|
||||
auto SentryReportError = [&](const std::string& transaction, int status) {
|
||||
if (T != "YOU_SHALL_NOT_PASS") {
|
||||
auto Lock = Sentry.CreateExclusiveContext();
|
||||
@ -56,12 +55,10 @@ void THeartbeatThread::operator()() {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
||||
T = Http::POST(Application::GetBackup1Hostname(), Target, {}, Body, false, &ResponseCode);
|
||||
if (T.substr(0, 2) != "20" || ResponseCode != 200) {
|
||||
debug("response 1: " + T);
|
||||
SentryReportError(Application::GetBackup1Hostname() + Target, ResponseCode);
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
||||
T = Http::POST(Application::GetBackup2Hostname(), Target, {}, Body, false, &ResponseCode);
|
||||
if (T.substr(0, 2) != "20" || ResponseCode != 200) {
|
||||
debug("response 2: " + T);
|
||||
warn("Backend system refused server! Server might not show in the public list");
|
||||
isAuth = false;
|
||||
SentryReportError(Application::GetBackup2Hostname() + Target, ResponseCode);
|
||||
|
Loading…
x
Reference in New Issue
Block a user