mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-11 01:48:07 +00:00
Fix the issue where we would create new worlds on ports that were still being used (#625)
* Wait for world to shutdown We need to wait for the message that the world has shutdown before shutting it down. * Dont sent people to dead instances * Added shutting down check Added check for isShuttingDown * Update when we remove from master
This commit is contained in:
@@ -31,6 +31,7 @@ public:
|
||||
m_PendingAffirmations = {};
|
||||
m_PendingRequests = {};
|
||||
m_Ready = false;
|
||||
m_IsShuttingDown = false;
|
||||
}
|
||||
|
||||
const std::string& GetIP() const { return m_IP; }
|
||||
@@ -46,6 +47,8 @@ public:
|
||||
|
||||
bool GetIsReady() const { return m_Ready; }
|
||||
void SetIsReady(bool value) { m_Ready = value; }
|
||||
bool GetIsShuttingDown() const { return m_IsShuttingDown; }
|
||||
void SetIsShuttingDown(bool value) { m_IsShuttingDown = value; }
|
||||
std::vector<PendingInstanceRequest>& GetPendingRequests() { return m_PendingRequests; }
|
||||
std::vector<PendingInstanceRequest>& GetPendingAffirmations() { return m_PendingAffirmations; }
|
||||
|
||||
@@ -82,6 +85,7 @@ private:
|
||||
std::vector<Player> m_Players;
|
||||
SystemAddress m_SysAddr;
|
||||
bool m_Ready;
|
||||
bool m_IsShuttingDown;
|
||||
std::vector<PendingInstanceRequest> m_PendingRequests;
|
||||
std::vector<PendingInstanceRequest> m_PendingAffirmations;
|
||||
|
||||
|
Reference in New Issue
Block a user