diff --git a/server/wsproxy/jsondatamgr.cc b/server/wsproxy/jsondatamgr.cc index 7b124f6..a5a3990 100644 --- a/server/wsproxy/jsondatamgr.cc +++ b/server/wsproxy/jsondatamgr.cc @@ -67,8 +67,9 @@ void JsonDataMgr::Init() routing_tables_json_.ReadFromFile(routing_tables_json_file); node_host_mutex_->lock(); for (int i = 0; i < routing_tables_json_.Size(); ++i) { - int node_id = routing_tables_json_.At("node_id")->AsXValue(); - std::string host = routing_tables_json_.At("host")->AsXValue(); + auto node_conf = routing_tables_json_.At(i); + int node_id = node_conf->At("node_id")->AsXValue(); + std::string host = node_conf->At("host")->AsXValue(); if (node_host_hash_.find(node_id) != node_host_hash_.end()) { abort(); }