This commit is contained in:
aozhiwei 2020-08-11 16:09:10 +08:00
parent fa1d719e7e
commit 3fb4b79df2
2 changed files with 2 additions and 1 deletions

View File

@ -911,6 +911,7 @@ void Player::_CMReconnect(f8::MsgHdr& hdr, const cs::CMReconnect& msg)
{
int old_socket_handle = socket_handle;
if (socket_handle != 0) {
GGListener::Instance()->ForceCloseChildSocket(socket_handle);
PlayerMgr::Instance()->RemovePlayerBySocket(socket_handle);
}
socket_handle = hdr.socket_handle;

View File

@ -180,7 +180,7 @@ void RoomMgr::_CMReconnect(f8::MsgHdr& hdr, const cs::CMReconnect& msg)
.SetSender(socket_handle),
[] (const a8::XParams& param)
{
GGListener::Instance()->ForceCloseClient(param.sender);
GGListener::Instance()->ForceCloseChildSocket(param.sender);
}
);
};