diff options
author | Florian Dold <florian@dold.me> | 2022-10-07 14:23:23 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-10-07 14:23:23 +0200 |
commit | a93a0cae131da4c3dd3f30ac5300f16f759758ff (patch) | |
tree | 6cc17143bc2e30965a459419fbf5c23b321a6303 /packages/taler-wallet-core/src/wallet.ts | |
parent | 1256c8704b11faceb21629cd50813ef2b7b9015b (diff) | |
download | wallet-core-a93a0cae131da4c3dd3f30ac5300f16f759758ff.tar.xz |
wallet-core: fix busy wait when long-polling for manual withdrawal
Diffstat (limited to 'packages/taler-wallet-core/src/wallet.ts')
-rw-r--r-- | packages/taler-wallet-core/src/wallet.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts index 484507d6b..aa3810035 100644 --- a/packages/taler-wallet-core/src/wallet.ts +++ b/packages/taler-wallet-core/src/wallet.ts @@ -512,14 +512,14 @@ async function runTaskLoop( ); continue; } - - minDue = AbsoluteTime.min(minDue, p.timestampDue); - if (AbsoluteTime.isExpired(p.timestampDue) && !ws.activeLongpoll[p.id]) { - numDue++; - } if (p.givesLifeness) { numGivingLiveness++; } + if (!p.isDue) { + continue; + } + minDue = AbsoluteTime.min(minDue, p.timestampDue); + numDue++; } if (opts.stopWhenDone && numGivingLiveness === 0 && iteration !== 0) { |