mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-17 13:38:18 +00:00
Merge pull request #9106 from ChillerDragon/pr_break_peer
Break early in peer matching
This commit is contained in:
commit
a56e5324d8
|
@ -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