Skip to content

Commit

Permalink
Merge pull request ddnet#9106 from ChillerDragon/pr_break_peer
Browse files Browse the repository at this point in the history
Break early in peer matching
  • Loading branch information
def- authored Oct 4, 2024
2 parents 70afd94 + 11047d1 commit a56e532
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/engine/shared/network_conn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a56e532

Please sign in to comment.