From: riqo Date: Sat, 30 Jan 2021 21:25:37 +0000 (-0600) Subject: fix websocket declaration X-Git-Tag: v0.9~117 X-Git-Url: https://andrewgundersen.net/repos?a=commitdiff_plain;h=3be7023792c7b9692026fd01646bb31b8b6940c6;p=mime-chat fix websocket declaration --- 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"); });