Skip to content

Commit

Permalink
Update timeout and add console.time
Browse files Browse the repository at this point in the history
  • Loading branch information
Hacksore committed Sep 23, 2024
1 parent 10b7450 commit e915c08
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/web/src/pages/test.astro
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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) => {
Expand All @@ -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);
}
});

Expand Down

0 comments on commit e915c08

Please sign in to comment.