mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-13 19:58:21 +00:00
correct exit
This commit is contained in:
parent
3e60b9db4a
commit
d085c0cf10
@ -47,6 +47,7 @@ namespace Game {
|
|||||||
|
|
||||||
bool shutdownSequenceStarted = false;
|
bool shutdownSequenceStarted = false;
|
||||||
void ShutdownSequence();
|
void ShutdownSequence();
|
||||||
|
int FinalizeShutdown();
|
||||||
dLogger* SetupLogger();
|
dLogger* SetupLogger();
|
||||||
void StartAuthServer();
|
void StartAuthServer();
|
||||||
void StartChatServer();
|
void StartChatServer();
|
||||||
@ -168,7 +169,7 @@ int main(int argc, char** argv) {
|
|||||||
|
|
||||||
std::cout << "Account created successfully!\n";
|
std::cout << "Account created successfully!\n";
|
||||||
|
|
||||||
Database::Destroy();
|
Database::Destroy("MasterServer");
|
||||||
delete Game::logger;
|
delete Game::logger;
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
@ -318,14 +319,8 @@ int main(int argc, char** argv) {
|
|||||||
t += std::chrono::milliseconds(highFrameRate);
|
t += std::chrono::milliseconds(highFrameRate);
|
||||||
std::this_thread::sleep_until(t);
|
std::this_thread::sleep_until(t);
|
||||||
}
|
}
|
||||||
|
FinalizeShutdown();
|
||||||
//Delete our objects here:
|
exit(0);
|
||||||
Database::Destroy();
|
|
||||||
delete Game::im;
|
|
||||||
delete Game::server;
|
|
||||||
delete Game::logger;
|
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dLogger* SetupLogger() {
|
dLogger* SetupLogger() {
|
||||||
@ -787,5 +782,15 @@ void ShutdownSequence() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
exit(0);
|
FinalizeShutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int FinalizeShutdown() {
|
||||||
|
//Delete our objects here:
|
||||||
|
Database::Destroy("MasterServer");
|
||||||
|
delete Game::im;
|
||||||
|
delete Game::server;
|
||||||
|
delete Game::logger;
|
||||||
|
|
||||||
|
exit(0);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user