diff options
author | Florian Dold <florian@dold.me> | 2022-03-29 13:47:32 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-03-29 13:48:51 +0200 |
commit | c265e7d019d445add2d2cfb7cfcbdeee059684d3 (patch) | |
tree | 6904e9cdb723992728ed511103be65094ca50034 /packages/taler-wallet-core/src/util/retries.ts | |
parent | be489b6b3ea4214f546dfc33d6bb0f39ce82b5ab (diff) | |
download | wallet-core-c265e7d019d445add2d2cfb7cfcbdeee059684d3.tar.xz |
wallet: make retries more robust and consistent
Diffstat (limited to 'packages/taler-wallet-core/src/util/retries.ts')
-rw-r--r-- | packages/taler-wallet-core/src/util/retries.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/taler-wallet-core/src/util/retries.ts b/packages/taler-wallet-core/src/util/retries.ts index 25b4c5055..8b7d64406 100644 --- a/packages/taler-wallet-core/src/util/retries.ts +++ b/packages/taler-wallet-core/src/util/retries.ts @@ -82,7 +82,7 @@ export function getRetryDuration( }; } -export function initRetryInfo(p: RetryPolicy = defaultRetryPolicy): RetryInfo { +export function resetRetryInfo(p: RetryPolicy = defaultRetryPolicy): RetryInfo { const now = AbsoluteTime.now(); const info = { firstTry: now, @@ -99,7 +99,7 @@ export namespace RetryInfo { p: RetryPolicy = defaultRetryPolicy, ) { if (!r) { - return initRetryInfo(p); + return resetRetryInfo(p); } const r2 = { ...r }; r2.retryCounter++; |