We have tested this and everything worked fine, now the tournment is in final test on production server. The first tournment worked fine with about 64 people and extension created the 16 rooms needed with no problem. Now we made a bigger test with 92 people but when we tried to "start turn" a lot of people it's been disconnected from the server. Any idea?
Here is the code that creates the rooms and put users inside them, I have put only relevant code and comment for the part of code I excluded.
Code: Select all
for (var x = 0; x < rounds[numRound].length; x++) {
// create room object newRoomObj with its parameters
// set room variable rVars
newRoom = _server.createRoom(newRoomObj, null, true, true, rVars);
if (newRoom != null) {
var resetRoomVariables = false;
var vars = [];
var uVars;
var nameUser;
var newRoomId = newRoom.getId();
var ok = _server.joinRoom(userNord, LOBBY_ID, false, newRoomId, newRoomObj.pwd, false, true);
if (ok) {
nameUser = String(userNord.getName());
uVars = { };
uVars.table = String(newRoomObj.name);
_server.setUserVariables(userNord, uVars);
} else {
resetRoomVariables = true;
vars.push( { name:"nord", val:"" } );
}
// do the same with other 3 users
if (resetRoomVariables) {
_server.setRoomVariables(newRoom, null, vars);
}
}
}