处理压测连接数大于服务最大连接数,并且有连接频繁建立、断开时,TC_EpollServer::ConnectionList::getUniqId()中出现assert错误

This commit is contained in:
tantc 2021-02-04 15:40:38 +08:00 committed by ruanshudong
parent 383a5888d9
commit ea3f65ef4e

View File

@ -1662,8 +1662,6 @@ void TC_EpollServer::NetThread::delConnection(TC_EpollServer::Connection *cPtr,
cPtr->getBindAdapter()->insertRecvQueue(recv);
}
cPtr->getBindAdapter()->decreaseNowConnection();
//从epoller删除句柄放在close之前, 否则重用socket时会有问题
_epoller.del(cPtr->getfd(), uid, 0);
@ -1674,6 +1672,8 @@ void TC_EpollServer::NetThread::delConnection(TC_EpollServer::Connection *cPtr,
{
_list.del(uid);
}
cPtr->getBindAdapter()->decreaseNowConnection();
}
}