1
This commit is contained in:
parent
d16e00654d
commit
b82a5e2d02
@ -336,22 +336,19 @@ void App::ProcessClientMsg(f8::MsgHdr& hdr)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#if MASTER_MODE
|
#if MASTER_MODE
|
||||||
TargetConn* conn = nullptr;
|
|
||||||
if (hdr.msgid == ss::_SS_CMLogin || hdr.msgid == ss::_SS_CMReConnect) {
|
if (hdr.msgid == ss::_SS_CMLogin || hdr.msgid == ss::_SS_CMReConnect) {
|
||||||
ss::SS_CMLogin_CMReConnect_CommonHead2 msg;
|
ss::SS_CMLogin_CMReConnect_CommonHead2 msg;
|
||||||
bool ok = msg.ParseFromArray(hdr.buf + hdr.offset, hdr.buflen - hdr.offset);
|
bool ok = msg.ParseFromArray(hdr.buf + hdr.offset, hdr.buflen - hdr.offset);
|
||||||
if (ok) {
|
if (ok) {
|
||||||
MasterSvrMgr::Instance()->RequestTargetServer(hdr, msg.team_uuid());
|
MasterSvrMgr::Instance()->RequestTargetServer(hdr, msg.team_uuid());
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
} else {
|
} else {
|
||||||
GameClient* client = GameClientMgr::Instance()->GetGameClientBySocket(hdr.socket_handle);
|
GameClient* client = GameClientMgr::Instance()->GetGameClientBySocket(hdr.socket_handle);
|
||||||
if (client) {
|
if (client && client->conn) {
|
||||||
conn = client->conn;
|
if (client->conn) {
|
||||||
|
client->conn->ForwardClientMsg(hdr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (conn) {
|
|
||||||
conn->ForwardClientMsg(hdr);
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
TargetConn* conn = nullptr;
|
TargetConn* conn = nullptr;
|
||||||
|
@ -42,7 +42,7 @@ void MasterSvrMgr::_SS_MS_ResponseTargetServer(f8::MsgHdr& hdr, const ss::SS_MS_
|
|||||||
std::string key = msg.host() + ":" + a8::XValue(msg.port()).GetString();
|
std::string key = msg.host() + ":" + a8::XValue(msg.port()).GetString();
|
||||||
TargetConn* conn = TargetConnMgr::Instance()->GetConnByKey(key);
|
TargetConn* conn = TargetConnMgr::Instance()->GetConnByKey(key);
|
||||||
if (conn) {
|
if (conn) {
|
||||||
|
conn->ForwardClientMsg(hdr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user