This commit is contained in:
aozhiwei 2019-05-24 11:24:25 +08:00
parent 244d93688d
commit ce629d17ec
3 changed files with 7 additions and 1 deletions

View File

@ -61,8 +61,12 @@ public:
virtual bool HandleRedirect(const std::string& url, const std::string& querystr,
std::string& location) override
{
#if 1
return false;
#else
location = "ws://192.168.100.21:7101";
return true;
#endif
}
virtual void OnDisConnect() override

View File

@ -23,7 +23,7 @@
#include "target_conn.h"
#include "target_conn_mgr.h"
#if MASTER_MODE
#ifdef MASTER_MODE
#include "mastersvr.h"
#include "mastersvrmgr.h"
#endif

View File

@ -17,6 +17,7 @@ void MasterSvrMgr::Init()
{
curr_context_id_ = a8::MakeInt64(0, time(nullptr) + 1000 * 60 * 10);
#if MASTER_MODE
auto master_svr_cluster_conf = JsonDataMgr::Instance()->GetMasterServerClusterConf();
for (int i = 0; i < master_svr_cluster_conf->Size(); ++i) {
auto master_svr_conf = master_svr_cluster_conf->At(i);
@ -30,6 +31,7 @@ void MasterSvrMgr::Init()
conn->Open();
}
}
#endif
}
void MasterSvrMgr::UnInit()