use setTimeout for heartbeat in favour of first random interval

This commit is contained in:
ITOH
2021-04-15 10:40:07 +02:00
parent 81a3bc3c26
commit 28ff1574d8
4 changed files with 44 additions and 28 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ Deno.test({
name: "[ws] Close all shards manually.",
async fn() {
ws.shards.forEach((shard) => {
clearInterval(shard.heartbeat.intervalId);
clearTimeout(shard.heartbeat.timeoutId);
shard.ws.close(3064, "Discordeno Testing Finished! Do Not RESUME!");
});