taler-typescript-core

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

commit b90d1c0318e392fa5324ea31abe3b86919cbf699
parent c8576b433d8442694e0427301cf061aade0a6f8e
Author: Florian Dold <florian.dold@gmail.com>
Date:   Thu, 17 Nov 2016 15:46:59 +0100

truncate back-off

Diffstat:
Msrc/wallet.ts | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/wallet.ts b/src/wallet.ts @@ -731,7 +731,7 @@ export class Wallet { retryDelayMs = 200): Promise<void> { if (this.processPreCoinConcurrent >= 4 || this.processPreCoinThrottle[preCoin.exchangeBaseUrl]) { console.log("delaying processPreCoin"); - setTimeout(() => this.processPreCoin(preCoin, retryDelayMs * 2), + setTimeout(() => this.processPreCoin(preCoin, Math.min(retryDelayMs * 2, 5 * 60 * 1000)), retryDelayMs); return; } @@ -791,7 +791,7 @@ export class Wallet { retryDelayMs, "ms", e); // exponential backoff truncated at one minute - let nextRetryDelayMs = Math.min(retryDelayMs * 2, 1000 * 60); + let nextRetryDelayMs = Math.min(retryDelayMs * 2, 5 * 60 * 1000); setTimeout(() => this.processPreCoin(preCoin, nextRetryDelayMs), retryDelayMs); this.processPreCoinThrottle[preCoin.exchangeBaseUrl] = (this.processPreCoinThrottle[preCoin.exchangeBaseUrl] || 0) + 1;