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/operations/backup/index.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/operations/backup/index.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/backup/index.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/taler-wallet-core/src/operations/backup/index.ts b/packages/taler-wallet-core/src/operations/backup/index.ts index 5013b9032..0b2bd7b80 100644 --- a/packages/taler-wallet-core/src/operations/backup/index.ts +++ b/packages/taler-wallet-core/src/operations/backup/index.ts @@ -89,7 +89,7 @@ import { checkLogicInvariant, } from "../../util/invariants.js"; import { GetReadWriteAccess } from "../../util/query.js"; -import { initRetryInfo, updateRetryInfoTimeout } from "../../util/retries.js"; +import { resetRetryInfo, updateRetryInfoTimeout } from "../../util/retries.js"; import { checkPaymentByProposalId, confirmPay, @@ -434,7 +434,7 @@ async function runBackupCycleForProvider( // FIXME: Allocate error code for this situation? prov.state = { tag: BackupProviderStateTag.Retrying, - retryInfo: initRetryInfo(), + retryInfo: resetRetryInfo(), }; await tx.backupProvider.put(prov); }); @@ -478,7 +478,7 @@ async function incrementBackupRetryInTx( } else if (pr.state.tag === BackupProviderStateTag.Ready) { pr.state = { tag: BackupProviderStateTag.Retrying, - retryInfo: initRetryInfo(), + retryInfo: resetRetryInfo(), lastError: err, }; } |