diff --git a/deps/commandline b/deps/commandline index 71240f6..01434c1 160000 --- a/deps/commandline +++ b/deps/commandline @@ -1 +1 @@ -Subproject commit 71240f634b211d830679e7d2841b897c7c30dad9 +Subproject commit 01434c11aaf82d37a126dc70f5aa02cc523dbbb4 diff --git a/include/Common.h b/include/Common.h index 2cf15b9..4698f6e 100644 --- a/include/Common.h +++ b/include/Common.h @@ -12,6 +12,7 @@ extern TSentry Sentry; #include #include #include +#include #include "Compat.h" diff --git a/src/THeartbeatThread.cpp b/src/THeartbeatThread.cpp index 6efdd74..42e7b36 100644 --- a/src/THeartbeatThread.cpp +++ b/src/THeartbeatThread.cpp @@ -62,8 +62,8 @@ void THeartbeatThread::operator()() { beammp_trace(T); Doc.Parse(T.data(), T.size()); if (Doc.HasParseError() || !Doc.IsObject()) { - beammp_error("Backend response failed to parse as valid json"); - beammp_debug("Response was: `" + T + "`"); + beammp_debug("Failed to contact backend at " + Url + " (this is not an error)."); + beammp_trace("Response was: " + T); Sentry.SetContext("JSON Response", { { "reponse", T } }); SentryReportError(Url + Target, ResponseCode); } else if (ResponseCode != 200) { @@ -105,6 +105,10 @@ void THeartbeatThread::operator()() { beammp_error("Missing/invalid json members in backend response"); 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) {