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