1
0

only take primary if world is loaded

This commit is contained in:
Emagi 2024-12-02 19:03:25 -05:00
parent 82bea97ff2
commit c54067fcf6

View File

@ -582,7 +582,7 @@ void HTTPSClientPool::pollPeerHealth(const std::string& server, const std::strin
peer_manager.setPrimary(id);
net.SetPrimary(false);
}
else if (!peer_manager.hasPrimary() && !net.is_primary && net.GetPeerPriority() <= peer_priority) {
else if (!peer_manager.hasPrimary() && world.world_loaded && !net.is_primary && net.GetPeerPriority() <= peer_priority) {
LogWrite(PEERING__INFO, 0, "Peering", "%s: I AM PRIMARY!", __FUNCTION__);
net.SetPrimary();
}