diff --git a/source/WorldServer/Web/HTTPSClientPool.cpp b/source/WorldServer/Web/HTTPSClientPool.cpp index 12dbc69..036c8b3 100644 --- a/source/WorldServer/Web/HTTPSClientPool.cpp +++ b/source/WorldServer/Web/HTTPSClientPool.cpp @@ -572,19 +572,21 @@ void HTTPSClientPool::pollPeerHealth(const std::string& server, const std::strin } // Process Clients if (json_tree.find("Clients") != json_tree.not_found()) { - const auto& clients_subtree = json_tree.get_child("Clients"); - - boost::property_tree::ptree clients_copy = clients_subtree; + // Create a new ptree to preserve the "Zones" key + boost::property_tree::ptree clients_copy; + // Copy the "Zones" node to zones_copy to preserve its key + clients_copy.put_child("Clients", json_tree.get_child("Clients")); peer_manager.updateClientTree(id, clients_copy); } // Process Zones if (json_tree.find("Zones") != json_tree.not_found()) { - const auto& zones_subtree = json_tree.get_child("Zones"); - - boost::property_tree::ptree zones_copy = zones_subtree; + // Create a new ptree to preserve the "Zones" key + boost::property_tree::ptree zones_copy; + // Copy the "Zones" node to zones_copy to preserve its key + zones_copy.put_child("Zones", json_tree.get_child("Zones")); peer_manager.updateZoneTree(id, zones_copy); }