diff --git a/server/wsproxy/jsondatamgr.cc b/server/wsproxy/jsondatamgr.cc index 40d62c4..29eadf3 100644 --- a/server/wsproxy/jsondatamgr.cc +++ b/server/wsproxy/jsondatamgr.cc @@ -7,14 +7,14 @@ void JsonDataMgr::Init() { std::string wsproxyserver_cluster_json_file; std::string targetserver_cluster_json_file; - if (getenv("is_dev_env")) { + if (f8::IsOnlineEnv()) { + wsproxyserver_cluster_json_file = a8::Format("../config/game%d.wsproxy.cluster.json", {GAME_ID}); + targetserver_cluster_json_file = a8::Format("../config/game%d.gameserver.cluster.json", {GAME_ID}); + } else { wsproxyserver_cluster_json_file = a8::Format("/var/data/conf_test/game%d/wsproxy/game%d.wsproxy.cluster.json", {GAME_ID, GAME_ID}); targetserver_cluster_json_file = a8::Format("/var/data/conf_test/game%d/wsproxy/game%d.gameserver.cluster.json", {GAME_ID, GAME_ID}); - } else { - wsproxyserver_cluster_json_file = a8::Format("../config/game%d.wsproxy.cluster.json", {GAME_ID}); - targetserver_cluster_json_file = a8::Format("../config/game%d.gameserver.cluster.json", {GAME_ID}); } wsproxyserver_cluster_json_.ReadFromFile(wsproxyserver_cluster_json_file); targetserver_cluster_json_.ReadFromFile(targetserver_cluster_json_file);