fix: mqtt memory leak #63
This commit is contained in:
+2
-2
@@ -57,7 +57,7 @@ const init = async () => {
|
|||||||
|
|
||||||
// Client connected
|
// Client connected
|
||||||
INTEGRATION.client
|
INTEGRATION.client
|
||||||
.on("connect", () => {
|
.once("connect", () => {
|
||||||
console.log(`MQTT Connected: ${url.toString()}\n`);
|
console.log(`MQTT Connected: ${url.toString()}\n`);
|
||||||
|
|
||||||
// Init client controls
|
// Init client controls
|
||||||
@@ -89,7 +89,7 @@ const init = async () => {
|
|||||||
INTEGRATION.initialized = true;
|
INTEGRATION.initialized = true;
|
||||||
})
|
})
|
||||||
.on("error", (error) => {
|
.on("error", (error) => {
|
||||||
console.error("MQTT:", error);
|
console.error("MQTT", error.message);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Update sensor states from events
|
// Update sensor states from events
|
||||||
|
|||||||
Reference in New Issue
Block a user