From 3a48e24c0c87bc18c9351c4d2bf4b71e4570e340 Mon Sep 17 00:00:00 2001 From: ading2210 Date: Mon, 4 Mar 2024 12:39:54 -0800 Subject: [PATCH] connect to 127.0.0.1 instead of null --- src/BareClient.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/BareClient.ts b/src/BareClient.ts index 52e278c..b8eb277 100644 --- a/src/BareClient.ts +++ b/src/BareClient.ts @@ -135,7 +135,7 @@ export class BareClient { let wsImpl = (webSocketImpl || WebSocket) as WebSocketImpl; - const socket = new wsImpl("wss:null", protocols); + const socket = new wsImpl("ws://127.0.0.1:1", protocols); let fakeProtocol = ''; @@ -340,7 +340,7 @@ export class BareClient { let switcher = findSwitcher(); if (!switcher.active) throw "there are no bare clients"; const client = switcher.active; - if (!client.ready) await (client as any).initpromise; + if (!client.ready) await client.init(); for (let i = 0; ; i++) { if ('host' in headers) headers.host = urlO.host;