From a970ec5377987bdc845a571c16514d3f15e8eadb Mon Sep 17 00:00:00 2001 From: Cameron Diver Date: Tue, 8 Jan 2019 16:13:20 +0000 Subject: [PATCH] Fix context bind errors by switching to async/await Change-type: patch Signed-off-by: Cameron Diver --- src/api-binder.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/api-binder.ts b/src/api-binder.ts index 7a728476..037ddffe 100644 --- a/src/api-binder.ts +++ b/src/api-binder.ts @@ -543,7 +543,8 @@ export class APIBinder { ++this.targetStateFetchErrors; } - return Bluebird.delay(pollInterval).then(this.pollTargetState); + await Bluebird.delay(pollInterval); + await this.pollTargetState(); } private async pinDevice({ app, commit }: DevicePinInfo) {