Stop sending empty arrays, fix sending empty requests

This commit is contained in:
Raphaël Jakse 2020-04-04 15:37:49 +02:00
parent 69090c9ac6
commit 3315e7511d
1 changed files with 3 additions and 3 deletions

View File

@ -671,7 +671,7 @@
function send(data) {
if (!pollingReady && ((data.cmds && data.cmds.length) && data.cmds[0].cmd !== "joinGame")) {
send([]);
sendCmds();
setTimeout(send.bind(null, data), POLLING_DELAY);
return;
}
@ -756,7 +756,7 @@
setTimeout(sendCmds.bind(null, []), POLLING_DELAY);
} else {
retriedImmediately = true;
sendCmds([])
sendCmds()
}
return;
}
@ -775,7 +775,7 @@
blockMove--;
if (!pollingServer) {
sendCmds([]);
sendCmds();
}
}
};