If we run out of temp sockets, then we should error out, not "fix" the issue by reusing MAX_TMP_SOCKETS -1.
(2.3 r9988) git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9998 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
15b25dcdfe
commit
8a785d511c
|
@ -3220,8 +3220,9 @@ static void NETallowJoining(void)
|
||||||
}
|
}
|
||||||
if (i == MAX_TMP_SOCKETS)
|
if (i == MAX_TMP_SOCKETS)
|
||||||
{
|
{
|
||||||
// prevent out-of-bounds access
|
// this should *never* happen, it would mean we are going to reuse a socket already in use.
|
||||||
i--;
|
debug(LOG_ERROR, "all temp sockets are used up!");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// See if there's an incoming connection
|
// See if there's an incoming connection
|
||||||
|
|
Loading…
Reference in New Issue