1
This commit is contained in:
parent
fa634112fb
commit
e2b9fd1517
@ -154,11 +154,12 @@ void MasterSvrMgr::RequestTargetServer(f8::MsgHdr& hdr, const std::string& team_
|
|||||||
void MasterSvrMgr::RemoveRequest(int socket_handle, long long context_id, bool auto_free)
|
void MasterSvrMgr::RemoveRequest(int socket_handle, long long context_id, bool auto_free)
|
||||||
{
|
{
|
||||||
if (context_id == GetContextIdBySocket(socket_handle)) {
|
if (context_id == GetContextIdBySocket(socket_handle)) {
|
||||||
if (auto_free) {
|
|
||||||
f8::MsgHdr* hdr = GetHdrByContextId(context_id);
|
f8::MsgHdr* hdr = GetHdrByContextId(context_id);
|
||||||
if (hdr) {
|
if (hdr) {
|
||||||
a8::TimerAttacher* timer_attacher = (a8::TimerAttacher*)hdr->user_data;
|
a8::TimerAttacher* timer_attacher = (a8::TimerAttacher*)hdr->user_data;
|
||||||
delete timer_attacher;
|
delete timer_attacher;
|
||||||
|
hdr->user_data = nullptr;
|
||||||
|
if (auto_free) {
|
||||||
if (hdr->buf) {
|
if (hdr->buf) {
|
||||||
free((char*)hdr->buf);
|
free((char*)hdr->buf);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user