fixed debug output, server exit hang, crashes

This commit is contained in:
Anonymous275
2020-11-07 18:52:03 +02:00
parent 5b92cbc0be
commit 2021f0b461
16 changed files with 80 additions and 59 deletions

View File

@@ -61,6 +61,8 @@ public:
struct ClientInterface{
std::set<Client*> Clients;
void RemoveClient(Client *c){
Assert(c);
c->ClearCars();
Clients.erase(c);
delete c;
c = nullptr;

View File

@@ -5,7 +5,6 @@
#include <iostream>
#include <mutex>
#include <string>
extern std::mutex MLock;
void InitLog();
#define DebugPrintTID() DebugPrintTIDInternal(__func__)
void DebugPrintTIDInternal(const std::string& func); // prints the current thread id in debug mode, to make tracing of crashes and asserts easier