Merge pull request #9106 from ChillerDragon/pr_break_peer

Break early in peer matching
This commit is contained in:
Dennis Felsing 2024-10-04 07:06:39 +00:00 committed by GitHub
commit a56e5324d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)