aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-02-21 19:23:32 +0100
committerFlorian Dold <florian@dold.me>2023-02-21 19:23:32 +0100
commit267714074995aab337b474dce2cb0236c2861a9c (patch)
treed81305b4a01b16f0e00cef59ffa8851fdee0cc63
parentffeac825d188fe8643801511797783e47b0fa830 (diff)
wallet-core: do not retry transaction if long-poll is active
-rw-r--r--packages/taler-wallet-core/src/operations/pay-peer.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/operations/pay-peer.ts b/packages/taler-wallet-core/src/operations/pay-peer.ts
index 5178839a4..bfb0dd589 100644
--- a/packages/taler-wallet-core/src/operations/pay-peer.ts
+++ b/packages/taler-wallet-core/src/operations/pay-peer.ts
@@ -1372,6 +1372,14 @@ export async function processPeerPullCredit(
pursePub,
});
+ // We're already running!
+ if (ws.activeLongpoll[retryTag]) {
+ logger.info("peer-pull-credit already in long-polling, returning!");
+ return {
+ type: OperationAttemptResultType.Longpoll,
+ };
+ }
+
switch (pullIni.status) {
case PeerPullPaymentInitiationStatus.PurseDeposited: {
// We implement this case so that the "retry" action on a peer-pull-credit transaction