diff --git a/server/wsproxy/app.cc b/server/wsproxy/app.cc index d950e9b..61a785f 100644 --- a/server/wsproxy/app.cc +++ b/server/wsproxy/app.cc @@ -351,7 +351,7 @@ void App::ProcessClientMsg(f8::MsgHdr& hdr) } if (hdr.msgid == ss::_SS_CMLogin || hdr.msgid == ss::_SS_CMReconnect) { auto down_wp = DownStreamMgr::Instance()->GetGameClientBySocket(hdr.socket_handle); - if (auto down = down_wp.lock(); !down_wp.expired()) { + if (down_wp.expired()) { switch (hdr.msgid) { case ss::_SS_CMLogin: { diff --git a/server/wsproxy/jsondatamgr.cc b/server/wsproxy/jsondatamgr.cc index 79516b1..ce5454f 100644 --- a/server/wsproxy/jsondatamgr.cc +++ b/server/wsproxy/jsondatamgr.cc @@ -13,17 +13,13 @@ void JsonDataMgr::Init() if (!f8::IsOnlineEnv()) { if (f8::IsTestEnv()) { - work_path_ = a8::Format("/root/pub/%d/%d/conf_test/game%d/wsproxy.test", + work_path_ = a8::Format("../../../conf_test/game%d/wsproxy.test", { GAME_ID, - App::Instance()->instance_id, - GAME_ID }); } else { - work_path_ = a8::Format("/root/pub/%d/%d/conf_test/game%d/wsproxy.dev", + work_path_ = a8::Format("../../../conf_test/game%d/wsproxy.dev", { - GAME_ID, - App::Instance()->instance_id, GAME_ID }); } diff --git a/server/wsproxy/upstreammgr.cc b/server/wsproxy/upstreammgr.cc index 2e4f165..2083dcb 100644 --- a/server/wsproxy/upstreammgr.cc +++ b/server/wsproxy/upstreammgr.cc @@ -53,7 +53,7 @@ std::weak_ptr UpStreamMgr::RecreateUpStream(const std::string& host, i if (!GetConnByKey(key).expired()) { return GetConnByKey(key); } - while (GetConnById(++curr_id_).expired()) {}; + while (!GetConnById(++curr_id_).expired()) {}; int instance_id = curr_id_; std::string remote_ip = host; int remote_port = port;