1
This commit is contained in:
parent
9759a9f009
commit
70758cada3
@ -3,6 +3,7 @@
|
||||
#include "target_conn_mgr.h"
|
||||
#include "target_conn.h"
|
||||
#include "jsondatamgr.h"
|
||||
#include "app.h"
|
||||
|
||||
void TargetConnMgr::Init()
|
||||
{
|
||||
@ -14,12 +15,18 @@ void TargetConnMgr::Init()
|
||||
int instance_id = target_server_conf->At("instance_id")->AsXValue();
|
||||
std::string remote_ip = target_server_conf->At("ip")->AsXValue();
|
||||
int remote_port = target_server_conf->At("port")->AsXValue();
|
||||
if (App::Instance()->HasFlag(3)) {
|
||||
remote_ip = "127.0.0.1";
|
||||
}
|
||||
{
|
||||
TargetConn* conn = new TargetConn();
|
||||
conn->Init(instance_id, remote_ip, remote_port);
|
||||
id_hash_[conn->instance_id] = conn;
|
||||
conn->Open();
|
||||
}
|
||||
if (App::Instance()->HasFlag(3)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user