Call LOG_QUIT after Networking's dtor call

pull/76/head
Koncord 8 years ago
parent add1a5e5b2
commit 94d5efdfd3

@ -30,10 +30,10 @@ Networking::Networking(RakNet::RakPeerInterface *peer)
controller->SetStream(0, &bsOut); // set send stream controller->SetStream(0, &bsOut); // set send stream
Script::Call<Script::CallbackIdentity("OnServerInit")>();
running = true; running = true;
exitCode = 0; exitCode = 0;
Script::Call<Script::CallbackIdentity("OnServerInit")>();
} }
Networking::~Networking() Networking::~Networking()
@ -42,6 +42,7 @@ Networking::~Networking()
sThis = 0; sThis = 0;
delete controller; delete controller;
LOG_QUIT();
} }
void Networking::Update(RakNet::Packet *packet) void Networking::Update(RakNet::Packet *packet)
@ -411,7 +412,6 @@ void Networking::StopServer(int code)
{ {
running = false; running = false;
exitCode = code; exitCode = code;
} }
int Networking::MainLoop() int Networking::MainLoop()

@ -202,8 +202,6 @@ int main(int argc, char *argv[])
if (code == 0) if (code == 0)
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "%s", "Quitting peacefully."); LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "%s", "Quitting peacefully.");
LOG_QUIT();
// Restore cout and cerr // Restore cout and cerr
std::cout.rdbuf(cout_rdbuf); std::cout.rdbuf(cout_rdbuf);
std::cerr.rdbuf(cerr_rdbuf); std::cerr.rdbuf(cerr_rdbuf);

Loading…
Cancel
Save