mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-17 21:48:19 +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;
|
IsPeer = false;
|
||||||
for(int i = 0; i < m_NumConnectAddrs; i++)
|
for(int i = 0; i < m_NumConnectAddrs; i++)
|
||||||
{
|
{
|
||||||
IsPeer = IsPeer || m_aConnectAddrs[i] == *pAddr;
|
if(m_aConnectAddrs[i] == *pAddr)
|
||||||
|
{
|
||||||
|
IsPeer = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(IsPeer)
|
if(IsPeer)
|
||||||
|
|
Loading…
Reference in a new issue