添加保护

This commit is contained in:
aozhiwei 2020-07-10 10:23:00 +08:00
parent 5508f96ab8
commit dc613359c9

View File

@ -467,11 +467,17 @@ void PlayerMgr::AsyncLoginOnOk(const std::string& account_id,
if (hdr) {
Player* hum = GetPlayerByAccountId(account_id);
if (hum) {
abort();
pending_socket_hash_.erase(hdr->socket_handle);
pending_account_hash_.erase(account_id);
f8::MsgHdr::Destroy(hdr);
return;
}
hum = GetPlayerBySocket(hdr->socket_handle);
if (hum) {
abort();
pending_socket_hash_.erase(hdr->socket_handle);
pending_account_hash_.erase(account_id);
f8::MsgHdr::Destroy(hdr);
return;
}
{
hum = new Player();