This commit is contained in:
azw 2023-04-14 11:31:05 +00:00
parent f937b70cca
commit 0ff0ffc565
3 changed files with 4 additions and 8 deletions

View File

@ -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:
{

View File

@ -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
});
}

View File

@ -53,7 +53,7 @@ std::weak_ptr<UpStream> 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;