1
This commit is contained in:
parent
1e87e6ddf2
commit
415f509878
@ -47,11 +47,13 @@ void JsonDataMgr::UnInit()
|
||||
|
||||
std::shared_ptr<a8::XObject> JsonDataMgr::GetConf()
|
||||
{
|
||||
if (App::Instance()->GetInstanceId() < 1 ||
|
||||
App::Instance()->GetInstanceId() > wsproxyserver_cluster_json_.Size()) {
|
||||
abort();
|
||||
for (int i = 0; i < wsproxyserver_cluster_json_.Size(); ++i) {
|
||||
std::shared_ptr<a8::XObject> conf = wsproxyserver_cluster_json_.At(i);
|
||||
if (conf->At("instance_id")->AsXValue().GetInt() == App::Instance()->GetInstanceId()) {
|
||||
return conf;
|
||||
}
|
||||
}
|
||||
return wsproxyserver_cluster_json_[App::Instance()->GetInstanceId() - 1];
|
||||
A8_ABORT();
|
||||
}
|
||||
|
||||
void JsonDataMgr::TraverseMaster(std::function<void (int, std::string, int)> cb)
|
||||
|
Loading…
x
Reference in New Issue
Block a user