From c0e6b6d0f66508ebc8d33502d1281cb48a1c9cc6 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 19 Aug 2021 15:12:33 +0200 Subject: run pending operations at least once, style fixes --- packages/taler-wallet-core/src/wallet.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'packages/taler-wallet-core/src/wallet.ts') diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts index 3c3da3cea..fec7e6155 100644 --- a/packages/taler-wallet-core/src/wallet.ts +++ b/packages/taler-wallet-core/src/wallet.ts @@ -333,7 +333,7 @@ async function runTaskLoop( } } - if (opts.stopWhenDone && numGivingLiveness === 0) { + if (opts.stopWhenDone && numGivingLiveness === 0 && iteration !== 0) { logger.warn(`stopping, as no pending operations have lifeness`); return; } @@ -970,15 +970,11 @@ export class Wallet { this.ws.stop(); } - runRetryLoop(): Promise { - return runTaskLoop(this.ws); - } - runPending(forceNow: boolean = false) { return runPending(this.ws, forceNow); } - runTaskLoop(opts: RetryLoopOpts) { + runTaskLoop(opts?: RetryLoopOpts) { return runTaskLoop(this.ws, opts); } -- cgit v1.2.3