mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Set the number of server list sockets based on the number of concurrent updates divided by 4
This commit is contained in:
parent
d07093fd96
commit
e3ebedc5e4
1 changed files with 4 additions and 1 deletions
|
@ -184,7 +184,10 @@ GServerList ServerListNew(const char *gamename, const char *enginename, const ch
|
||||||
list->encryptdata = 1;
|
list->encryptdata = 1;
|
||||||
list->async = 0;
|
list->async = 0;
|
||||||
|
|
||||||
list->numslsockets = 2;
|
list->numslsockets = maxconcupdates / 4;
|
||||||
|
if (list->numslsockets < 1) {
|
||||||
|
list->numslsockets = 1;
|
||||||
|
}
|
||||||
list->slsockets = (GServerListSocket)malloc(sizeof(struct GServerListSocketImplementation) * list->numslsockets);
|
list->slsockets = (GServerListSocket)malloc(sizeof(struct GServerListSocketImplementation) * list->numslsockets);
|
||||||
memset(list->slsockets, 0, sizeof(struct GServerListSocketImplementation) * list->numslsockets);
|
memset(list->slsockets, 0, sizeof(struct GServerListSocketImplementation) * list->numslsockets);
|
||||||
list->startslindex = 0;
|
list->startslindex = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue