From 3be7023792c7b9692026fd01646bb31b8b6940c6 Mon Sep 17 00:00:00 2001 From: riqo Date: Sat, 30 Jan 2021 15:25:37 -0600 Subject: [PATCH] fix websocket declaration --- src/background.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/background.ts b/src/background.ts index 169469a..56d3419 100644 --- a/src/background.ts +++ b/src/background.ts @@ -23,7 +23,6 @@ let ai = new portAudio.AudioIO({ }); import WebSocket from "ws"; -const ws = new WebSocket("ws://localhost:8080"); // Keep a global reference of the window object, if you don't, the window will // be closed automatically when the JavaScript object is garbage collected. @@ -62,6 +61,7 @@ function createWindow() { win.webContents.on('did-finish-load', () => { + const ws = new WebSocket("ws://localhost:8080"); ws.on("open", function open() { // ws.send("hernandeze2@xavier.edu"); }); -- 2.43.0