fix: Return a promise when retrying provisioning to avoid continuing after a failure

Otherwise we'll keep doing the rest of the APIBinder init steps, like reporting initial config,
potentially before completing the provisioning.

Change-type: patch
Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
This commit is contained in:
Pablo Carranza Velez 2019-03-20 16:48:20 -07:00
parent 1572640bce
commit 6e3bedeb1d

View File

@ -875,7 +875,7 @@ export class APIBinder {
delay: retryDelay,
});
await Bluebird.delay(retryDelay);
this.provisionOrRetry(retryDelay);
return this.provisionOrRetry(retryDelay);
}
}