Don't attempt to report any state during local mode

Even though this would never have attempted to report the state to the
api during local mode, it leaves behind artifacts which would cause the
state to be sometimes reported when exiting local mode. This would cause
the api to reject the update unecessarily.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
This commit is contained in:
Cameron Diver 2019-04-10 15:40:52 +01:00
parent 0b1d2b7702
commit 892cf1961e
No known key found for this signature in database
GPG Key ID: 49690ED87032539F

View File

@ -521,6 +521,9 @@ export class APIBinder {
private reportCurrentState(): null {
(async () => {
if ((await this.config.get('localMode')) === true) {
return;
}
this.reportPending = true;
try {
const currentDeviceState = await this.deviceState.getStatus();