From: Raphaƫl Jakse Date: Sat, 4 Apr 2020 13:37:49 +0000 (+0200) Subject: Stop sending empty arrays, fix sending empty requests X-Git-Url: https://secure.softndesign.org/git/?a=commitdiff_plain;h=3315e7511d1e4c3a0ffe3b4f949df0d06daad049;p=trivabble.git Stop sending empty arrays, fix sending empty requests --- diff --git a/trivabble.js b/trivabble.js index f39d684..0659da6 100644 --- a/trivabble.js +++ b/trivabble.js @@ -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(); } } };