mirror of
https://gitee.com/TarsCloud/TarsCpp.git
synced 2024-12-22 22:16:38 +08:00
fix getConnStatus bug that return all connections on all listen ports
This commit is contained in:
parent
b905a633ff
commit
0693d46f19
@ -1269,7 +1269,7 @@ vector<TC_EpollServer::ConnStatus> TC_EpollServer::ConnectionList::getConnStatus
|
||||
for(size_t i = 1; i <= _total; i++)
|
||||
{
|
||||
//是当前监听端口的连接
|
||||
if(_vConn[i].first != NULL && _vConn[i].first->isTcp()) //getListenfd() == lfd)
|
||||
if(_vConn[i].first != NULL && _vConn[i].first->isTcp() && _vConn[i].first->getBindAdapter()->getSocket().getfd() == lfd) //getListenfd() == lfd)
|
||||
{
|
||||
ConnStatus cs;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user