Skip to content

Commit

Permalink
Terminate connection before opening a new one
Browse files Browse the repository at this point in the history
  • Loading branch information
dklinger authored Jun 19, 2023
1 parent 483dcd5 commit b5f33ca
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,7 @@ async function getAutoUpdates() {
}

if (user !== null && host !== null && port !== null) {
if (ws !== null) ws.terminate();
ws = new WebSocket("ws://" + host + ":" + port);

ws.on("open", () => {
Expand Down

0 comments on commit b5f33ca

Please sign in to comment.