mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-18 14:08:19 +00:00
Break early in peer matching
This commit is contained in:
parent
e8798a9e2f
commit
11047d1b80
|
@ -362,7 +362,11 @@ int CNetConnection::Feed(CNetPacketConstruct *pPacket, NETADDR *pAddr, SECURITY_
|
|||
IsPeer = false;
|
||||
for(int i = 0; i < m_NumConnectAddrs; i++)
|
||||
{
|
||||
IsPeer = IsPeer || m_aConnectAddrs[i] == *pAddr;
|
||||
if(m_aConnectAddrs[i] == *pAddr)
|
||||
{
|
||||
IsPeer = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(IsPeer)
|
||||
|
|
Loading…
Reference in a new issue