taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 935ae63779b136e5f7c580d38cf9aee13bb7890e
parent e3531701fb8c9552da67d3a4c7a0d2fce5d4ec30
Author: Florian Dold <dold@taler.net>
Date:   Wed, 22 Jul 2026 10:50:51 +0200

wallet: reset the retry counter when a task schedules its own next run

A recurring task grew the counter on every run, so the backoff after its first
genuine error started out already saturated.

Diffstat:
Mpackages/taler-wallet-core/src/shepherd.ts | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/packages/taler-wallet-core/src/shepherd.ts b/packages/taler-wallet-core/src/shepherd.ts @@ -675,7 +675,11 @@ async function storePendingTaskPending( hadError = true; } delete retryRecord.lastError; - retryRecord.retryInfo = DbRetryInfo.increment(retryRecord.retryInfo); + // A task that names its own next run time is not backing off, so the + // counter must not grow over the lifetime of a recurring task. + retryRecord.retryInfo = schedTime + ? DbRetryInfo.reset() + : DbRetryInfo.increment(retryRecord.retryInfo); } if (schedTime) { retryRecord.retryInfo.nextRetry = timestampPreciseToDb(