1
This commit is contained in:
parent
9d28ce3228
commit
4822200f39
@ -855,12 +855,16 @@ void RoomMgr::_CMJoinCustomBattle(f8::MsgHdr& hdr, const cs::CMJoin& msg)
|
|||||||
auto ip_saddr = hdr.ip_saddr;
|
auto ip_saddr = hdr.ip_saddr;
|
||||||
auto socket_handle = hdr.socket_handle;
|
auto socket_handle = hdr.socket_handle;
|
||||||
auto cb =
|
auto cb =
|
||||||
[join_msg, socket_handle] (int errcode, const std::string errmsg, std::shared_ptr<CustomBattle>)
|
[join_msg, socket_handle] (int errcode, const std::string errmsg, std::shared_ptr<CustomBattle> p)
|
||||||
{
|
{
|
||||||
if (!errcode) {
|
if (!errcode) {
|
||||||
RoomMgr::Instance()->JoinErrorHandle(*join_msg, 2, socket_handle);
|
RoomMgr::Instance()->JoinErrorHandle(*join_msg, 2, socket_handle);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (Global::g_nowtime - p->GetStartTime() > 30) {
|
||||||
|
RoomMgr::Instance()->JoinErrorHandle(*join_msg, 2, socket_handle);
|
||||||
|
return;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
SendGetCustomBattleData(join_msg, cb);
|
SendGetCustomBattleData(join_msg, cb);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user