From 02465c529d5d1cfda0419b583b5702fb6e750fbc Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Mon, 23 Sep 2024 22:08:45 +0200 Subject: [PATCH] add more logging to exit --- src/Network/Core.cpp | 4 +++- src/Security/BeamNG.cpp | 1 - src/main.cpp | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Network/Core.cpp b/src/Network/Core.cpp index 641b49e..c3d18c4 100644 --- a/src/Network/Core.cpp +++ b/src/Network/Core.cpp @@ -178,8 +178,10 @@ void Parse(std::string Data, SOCKET CSocket) { TCPTerminate = true; ping = -1; } - if (SubCode == 'G') + if (SubCode == 'G') { + debug("Closing via 'G' packet"); exit(2); + } Data.clear(); break; case 'R': // will send mod name diff --git a/src/Security/BeamNG.cpp b/src/Security/BeamNG.cpp index 955e25a..9e051c8 100644 --- a/src/Security/BeamNG.cpp +++ b/src/Security/BeamNG.cpp @@ -17,7 +17,6 @@ #endif #include "Logger.h" #include -#include #include #include diff --git a/src/main.cpp b/src/main.cpp index f748574..cbb5da2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -55,5 +55,6 @@ int main(int argc, char** argv) try { } catch (const std::exception& e) { error(std::string("Exception in main(): ") + e.what()); info("Closing in 5 seconds"); + info("If this keeps happening, contact us on either: Forum: https://forum.beammp.com, Discord: https://discord.gg/beammp"); std::this_thread::sleep_for(std::chrono::seconds(5)); }