diff options
Diffstat (limited to 'packages/instant/src/util/heartbeater.ts')
-rw-r--r-- | packages/instant/src/util/heartbeater.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/instant/src/util/heartbeater.ts b/packages/instant/src/util/heartbeater.ts index 87af48423..a5b42d87f 100644 --- a/packages/instant/src/util/heartbeater.ts +++ b/packages/instant/src/util/heartbeater.ts @@ -4,8 +4,8 @@ type HeartbeatableFunction = () => Promise<void>; export class Heartbeater { private _intervalId?: number; private _hasPendingRequest: boolean; - private _performImmediatelyOnStart: boolean; - private _performFunction: HeartbeatableFunction; + private readonly _performImmediatelyOnStart: boolean; + private readonly _performFunction: HeartbeatableFunction; public constructor(performingFunctionAsync: HeartbeatableFunction, performImmediatelyOnStart: boolean) { this._performFunction = performingFunctionAsync; @@ -19,6 +19,7 @@ export class Heartbeater { } if (this._performImmediatelyOnStart) { + // tslint:disable-next-line:no-floating-promises this._trackAndPerformAsync(); } |