From b5f33ca2d67879bbb71c590d848ef848619ccc6d Mon Sep 17 00:00:00 2001 From: Daniel Klinger Date: Mon, 19 Jun 2023 10:11:36 +0200 Subject: [PATCH] Terminate connection before opening a new one https://github.com/Jey-Cee/ioBroker.deconz/issues/316 --- main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/main.js b/main.js index 4a426c1..96efed0 100755 --- a/main.js +++ b/main.js @@ -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", () => {