mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-01 23:35:41 +00:00
Simplify "Backend heartbeat response" error (closes #97)
This commit is contained in:
parent
a97763a94f
commit
71c2d4b859
2
deps/commandline
vendored
2
deps/commandline
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 71240f634b211d830679e7d2841b897c7c30dad9
|
Subproject commit 01434c11aaf82d37a126dc70f5aa02cc523dbbb4
|
@ -12,6 +12,7 @@ extern TSentry Sentry;
|
|||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <zlib.h>
|
#include <zlib.h>
|
||||||
|
#include <filesystem>
|
||||||
|
|
||||||
#include "Compat.h"
|
#include "Compat.h"
|
||||||
|
|
||||||
|
@ -62,8 +62,8 @@ void THeartbeatThread::operator()() {
|
|||||||
beammp_trace(T);
|
beammp_trace(T);
|
||||||
Doc.Parse(T.data(), T.size());
|
Doc.Parse(T.data(), T.size());
|
||||||
if (Doc.HasParseError() || !Doc.IsObject()) {
|
if (Doc.HasParseError() || !Doc.IsObject()) {
|
||||||
beammp_error("Backend response failed to parse as valid json");
|
beammp_debug("Failed to contact backend at " + Url + " (this is not an error).");
|
||||||
beammp_debug("Response was: `" + T + "`");
|
beammp_trace("Response was: " + T);
|
||||||
Sentry.SetContext("JSON Response", { { "reponse", T } });
|
Sentry.SetContext("JSON Response", { { "reponse", T } });
|
||||||
SentryReportError(Url + Target, ResponseCode);
|
SentryReportError(Url + Target, ResponseCode);
|
||||||
} else if (ResponseCode != 200) {
|
} else if (ResponseCode != 200) {
|
||||||
@ -105,6 +105,10 @@ void THeartbeatThread::operator()() {
|
|||||||
beammp_error("Missing/invalid json members in backend response");
|
beammp_error("Missing/invalid json members in backend response");
|
||||||
Sentry.LogError("Missing/invalid json members in backend response", __FILE__, std::to_string(__LINE__));
|
Sentry.LogError("Missing/invalid json members in backend response", __FILE__, std::to_string(__LINE__));
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (!Application::Settings.Private) {
|
||||||
|
beammp_warn("Backend failed to respond to a heartbeat. Your server may temporarily disappear from the server list. This is not an error, and will likely resolve itself soon. Direct connect will still work.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Ok && !isAuth) {
|
if (Ok && !isAuth) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user