fix: ensure we are using a ws protocol

This commit is contained in:
Derrick Hammer 2023-12-18 01:21:13 -05:00
parent 36529bfe06
commit bb7c7dcece
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 1 deletions

View File

@ -70,7 +70,9 @@ export async function subscribeToEntry(
endpointPath: opts.endpointSubscribeEntry,
});
const socket = new WS(url);
const wsUrl = url.replace(/^http/, "ws");
const socket = new WS(wsUrl);
socket.once("open", () => {
const packer = new Packer();