From e915c08d2c6bc17fa16f382802cf0d5044109bea Mon Sep 17 00:00:00 2001 From: Sean Boult <996134+Hacksore@users.noreply.github.com> Date: Mon, 23 Sep 2024 09:51:14 -0500 Subject: [PATCH] Update timeout and add console.time --- apps/web/src/pages/test.astro | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/web/src/pages/test.astro b/apps/web/src/pages/test.astro index 0aeb110b..5c879a75 100644 --- a/apps/web/src/pages/test.astro +++ b/apps/web/src/pages/test.astro @@ -39,7 +39,7 @@ import testOgImage from "../assets/pages/rpc-test.png"; const streamkitWrapperDiv = document.getElementById("streamkit-wrapper")!; const streamkitDiv = document.getElementById("streamkit")!; - const MAX_TIMEOUT_MS = 5_000; + const MAX_TIMEOUT_MS = 100_000; function connectToDiscord( label: string, @@ -57,6 +57,7 @@ import testOgImage from "../assets/pages/rpc-test.png"; socket.addEventListener("open", () => { console.log(`[${label}] Connected to ws server`); domNode.innerHTML = "🌎 Connected to Discord"; + console.time(label); }); socket.addEventListener("message", (event) => { @@ -67,6 +68,7 @@ import testOgImage from "../assets/pages/rpc-test.png"; domNode.innerHTML = "✅ Received Discord READY Event"; clearTimeout(timeoutId); connectionMap[label] = true; + console.timeEnd(label); } });