mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-02 15:55:30 +00:00
Http, Heartbeat: Process status < 0 differently, report as "Invalid
Response Code"
This commit is contained in:
parent
6883c96d33
commit
15704abf6c
@ -210,6 +210,7 @@ std::string Http::POST(const std::string& host, const std::string& target, const
|
||||
|
||||
// RFC 2616, RFC 7231
|
||||
static std::map<size_t, const char*> Map = {
|
||||
{ -1, "Invalid Response Code"},
|
||||
{ 100, "Continue" },
|
||||
{ 101, "Switching Protocols" },
|
||||
{ 102, "Processing" },
|
||||
|
@ -36,9 +36,6 @@ void THeartbeatThread::operator()() {
|
||||
Body += "&pps=" + Application::PPS();
|
||||
|
||||
auto SentryReportError = [&](const std::string& transaction, int status) {
|
||||
if (status < 0) {
|
||||
status = 0;
|
||||
}
|
||||
auto Lock = Sentry.CreateExclusiveContext();
|
||||
Sentry.SetContext("heartbeat",
|
||||
{ { "response-body", T },
|
||||
|
Loading…
x
Reference in New Issue
Block a user