gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-core] branch master updated: remove activeLongPoll on erro


From: gnunet
Subject: [taler-wallet-core] branch master updated: remove activeLongPoll on error and prevent activeLongPoll skip if forced
Date: Fri, 13 Jan 2023 20:34:16 +0100

This is an automated email from the git hooks/post-receive script.

sebasjm pushed a commit to branch master
in repository wallet-core.

The following commit(s) were added to refs/heads/master by this push:
     new 767f1a9d6 remove activeLongPoll on error and prevent activeLongPoll 
skip if forced
767f1a9d6 is described below

commit 767f1a9d671d426b0c5b32626900ab26d93f13d4
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Fri Jan 13 16:34:07 2023 -0300

    remove activeLongPoll on error and prevent activeLongPoll skip if forced
---
 packages/taler-wallet-core/src/operations/withdraw.ts | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/packages/taler-wallet-core/src/operations/withdraw.ts 
b/packages/taler-wallet-core/src/operations/withdraw.ts
index 368cf3510..a1a39bf32 100644
--- a/packages/taler-wallet-core/src/operations/withdraw.ts
+++ b/packages/taler-wallet-core/src/operations/withdraw.ts
@@ -982,7 +982,9 @@ enum BankStatusResultCode {
 export async function processWithdrawalGroup(
   ws: InternalWalletState,
   withdrawalGroupId: string,
-  options: object = {},
+  options: {
+    forceNow?: boolean;
+  } = {},
 ): Promise<OperationAttemptResult> {
   logger.trace("processing withdrawal group", withdrawalGroupId);
   const withdrawalGroup = await ws.db
@@ -998,7 +1000,7 @@ export async function processWithdrawalGroup(
   const retryTag = RetryTags.forWithdrawal(withdrawalGroup);
 
   // We're already running!
-  if (ws.activeLongpoll[retryTag]) {
+  if (ws.activeLongpoll[retryTag] && !options.forceNow) {
     logger.info("withdrawal group already in long-polling, returning!");
     return {
       type: OperationAttemptResultType.Longpoll,
@@ -1035,8 +1037,9 @@ export async function processWithdrawalGroup(
             getErrorDetailFromException(e),
           );
           return;
+        } finally {
+          delete ws.activeLongpoll[retryTag];
         }
-        delete ws.activeLongpoll[retryTag];
         if (!res.ready) {
           await storeOperationPending(ws, retryTag);
         }

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]