mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix bug where timed out people can connect more than sv_max_clients_per_ip times
This commit is contained in:
parent
7223d0ecc1
commit
c78ade00c1
|
@ -145,7 +145,9 @@ int CNetServer::NumClientsWithAddr(NETADDR Addr)
|
|||
for(int i = 0; i < MaxClients(); ++i)
|
||||
{
|
||||
if(m_aSlots[i].m_Connection.State() == NET_CONNSTATE_OFFLINE ||
|
||||
m_aSlots[i].m_Connection.State() == NET_CONNSTATE_ERROR)
|
||||
(m_aSlots[i].m_Connection.State() == NET_CONNSTATE_ERROR &&
|
||||
(!m_aSlots[i].m_Connection.m_TimeoutProtected ||
|
||||
!m_aSlots[i].m_Connection.m_TimeoutSituation)))
|
||||
continue;
|
||||
|
||||
OtherAddr = *m_aSlots[i].m_Connection.PeerAddress();
|
||||
|
|
Loading…
Reference in a new issue