Skip to content

Commit

Permalink
feat(mqtt): Await MQTT disconnect before proceeding with shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
depau committed Apr 10, 2021
1 parent 21b5876 commit 1c0410c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/mqtt/MqttController.js
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,10 @@ class MqttController {
}

Logger.debug("Disconnecting MQTT Client...");
this.client.end();
await this.asyncClient.end();

this.client = null;
this.asyncClient = null;
Logger.debug("Disconnecting the MQTT Client done");
}

Expand Down

0 comments on commit 1c0410c

Please sign in to comment.