Fix redundant socket closing bug

Cvar 'sv_rcon_maxsockets' is always higher than the actual allowed socket count. Should only check if its count is higher than the cvar.
This commit is contained in:
Kawe Mazidjatari 2023-08-04 17:34:30 +02:00
parent f2783ae93f
commit bb5e92a563

View File

@ -90,7 +90,7 @@ void CRConServer::Think(void)
const int nCount = m_Socket.GetAcceptedSocketCount();
// Close redundant sockets if there are too many except for whitelisted and authenticated.
if (nCount >= sv_rcon_maxsockets->GetInt())
if (nCount > sv_rcon_maxsockets->GetInt())
{
for (m_nConnIndex = nCount - 1; m_nConnIndex >= 0; m_nConnIndex--)
{