mirror of
https://gitee.com/TarsCloud/TarsCpp.git
synced 2025-01-05 17:42:24 +08:00
Merge pull request #148 from tantongchao/master
处理压测连接数大于服务最大连接数,并且有连接频繁建立、断开时,TC_EpollServer::ConnectionList::getUniqId()中出现assert错误
This commit is contained in:
commit
c87fa9e301
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user