From 38d53f0a6def0dc50fb4e56a8d365d9603436450 Mon Sep 17 00:00:00 2001 From: Klesti Selimaj Date: Mon, 16 Feb 2026 00:49:01 +0100 Subject: [PATCH] Fixed small issue --- src/client.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client.ts b/src/client.ts index 4d402c2..234f29c 100644 --- a/src/client.ts +++ b/src/client.ts @@ -42,12 +42,12 @@ async function ensureSocket(useLocalhost: boolean): Promise { return new Promise((resolve, reject) => { const ws = new WebSocket(getWsOrigin(useLocalhost)); - ws.onopen = () => { + ws.onopen = async () => { socket = ws; console.log("Authenticating with cookies:", getCookies()); - sendUnsafe(useLocalhost, { cookies: getCookies() }); + await sendUnsafe(useLocalhost, { cookies: getCookies() }); resolve(ws); };