Skip to content

Commit

Permalink
fix(mqtt): Make sure that we only refresh handles while we're connected
Browse files Browse the repository at this point in the history
  • Loading branch information
Hypfer committed Oct 30, 2022
1 parent 1c5482d commit 67e66a0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions backend/lib/mqtt/MqttController.js
Expand Up @@ -228,6 +228,10 @@ class MqttController {
return;
}

if (this.state !== HomieCommonAttributes.STATE.READY) {
return;
}

this.robotHandle.refresh().catch((reason => {
Logger.error("Failed auto refresh:", reason);
}));
Expand Down

0 comments on commit 67e66a0

Please sign in to comment.