From bf77d9b2a04a5490f29a9afa846219e74d3b3af5 Mon Sep 17 00:00:00 2001 From: leukipp Date: Sun, 31 Aug 2025 16:09:39 +0200 Subject: [PATCH] fix: mqtt memory leak #63 --- js/integration.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/integration.js b/js/integration.js index c56c085..d064ab8 100644 --- a/js/integration.js +++ b/js/integration.js @@ -57,7 +57,7 @@ const init = async () => { // Client connected INTEGRATION.client - .on("connect", () => { + .once("connect", () => { console.log(`MQTT Connected: ${url.toString()}\n`); // Init client controls @@ -89,7 +89,7 @@ const init = async () => { INTEGRATION.initialized = true; }) .on("error", (error) => { - console.error("MQTT:", error); + console.error("MQTT", error.message); }); // Update sensor states from events