From 3315e7511d1e4c3a0ffe3b4f949df0d06daad049 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Jakse?= Date: Sat, 4 Apr 2020 15:37:49 +0200 Subject: [PATCH] Stop sending empty arrays, fix sending empty requests --- trivabble.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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(); } } }; -- 2.30.2