Skip to content

Commit

Permalink
fix(mqtt): More .disconnect() fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Hypfer committed Dec 19, 2021
1 parent 82bc46b commit 322efcc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/lib/mqtt/MqttController.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,8 @@ class MqttController {


if (this.client && !this.client.disconnected) {
throw new Error("MQTT.js is pretending to be disconnected");
Logger.warn("MQTT.js is pretending to be disconnected");
this.client.end(true);
}

this.client = null;
Expand Down

0 comments on commit 322efcc

Please sign in to comment.