mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-03 06:16:04 +00:00
Add shutting down / shutdown states to state keeper
This commit is contained in:
@@ -116,10 +116,12 @@ THeartbeatThread::THeartbeatThread(TResourceManager& ResourceManager, TServer& S
|
||||
, mServer(Server) {
|
||||
Application::SetSubsystemStatus("Heartbeat", Application::Status::Starting);
|
||||
Application::RegisterShutdownHandler([&] {
|
||||
Application::SetSubsystemStatus("Heartbeat", Application::Status::ShuttingDown);
|
||||
if (mThread.joinable()) {
|
||||
mShutdown = true;
|
||||
mThread.join();
|
||||
}
|
||||
Application::SetSubsystemStatus("Heartbeat", Application::Status::Shutdown);
|
||||
});
|
||||
Start();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user