diff --git a/server/wsproxy/GCListener.cc b/server/wsproxy/GCListener.cc index 4360f4a..78a866c 100644 --- a/server/wsproxy/GCListener.cc +++ b/server/wsproxy/GCListener.cc @@ -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 diff --git a/server/wsproxy/app.cc b/server/wsproxy/app.cc index 25248b8..3725190 100644 --- a/server/wsproxy/app.cc +++ b/server/wsproxy/app.cc @@ -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 diff --git a/server/wsproxy/mastersvrmgr.cc b/server/wsproxy/mastersvrmgr.cc index 5a8a08c..770dda5 100644 --- a/server/wsproxy/mastersvrmgr.cc +++ b/server/wsproxy/mastersvrmgr.cc @@ -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()