From c54067fcf6f7d274b44d61f0252faffd77ac4081 Mon Sep 17 00:00:00 2001 From: Emagi Date: Mon, 2 Dec 2024 19:03:25 -0500 Subject: [PATCH] only take primary if world is loaded --- source/WorldServer/Web/HTTPSClientPool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/WorldServer/Web/HTTPSClientPool.cpp b/source/WorldServer/Web/HTTPSClientPool.cpp index a69c542..2d68564 100644 --- a/source/WorldServer/Web/HTTPSClientPool.cpp +++ b/source/WorldServer/Web/HTTPSClientPool.cpp @@ -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(); }