add more logging to exit

This commit is contained in:
Lion Kortlepel 2024-09-23 22:08:45 +02:00
parent c68cbf8946
commit 02465c529d
No known key found for this signature in database
GPG Key ID: 4322FF2B4C71259B
3 changed files with 4 additions and 2 deletions

View File

@ -178,8 +178,10 @@ void Parse(std::string Data, SOCKET CSocket) {
TCPTerminate = true; TCPTerminate = true;
ping = -1; ping = -1;
} }
if (SubCode == 'G') if (SubCode == 'G') {
debug("Closing via 'G' packet");
exit(2); exit(2);
}
Data.clear(); Data.clear();
break; break;
case 'R': // will send mod name case 'R': // will send mod name

View File

@ -17,7 +17,6 @@
#endif #endif
#include "Logger.h" #include "Logger.h"
#include <fstream> #include <fstream>
#include <sstream>
#include <string> #include <string>
#include <thread> #include <thread>

View File

@ -55,5 +55,6 @@ int main(int argc, char** argv) try {
} catch (const std::exception& e) { } catch (const std::exception& e) {
error(std::string("Exception in main(): ") + e.what()); error(std::string("Exception in main(): ") + e.what());
info("Closing in 5 seconds"); 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)); std::this_thread::sleep_for(std::chrono::seconds(5));
} }