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:
David Markowitz
2022-07-18 16:08:33 -07:00
committed by GitHub
parent ef8c2a40f3
commit b55606d41e
3 changed files with 10 additions and 5 deletions

View File

@@ -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;