[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-cashless2ecash] branch master updated: fix: last retry will be se
From: |
gnunet |
Subject: |
[taler-cashless2ecash] branch master updated: fix: last retry will be set infinitely often |
Date: |
Wed, 22 May 2024 00:12:37 +0200 |
This is an automated email from the git hooks/post-receive script.
joel-haeberli pushed a commit to branch master
in repository cashless2ecash.
The following commit(s) were added to refs/heads/master by this push:
new 926c687 fix: last retry will be set infinitely often
926c687 is described below
commit 926c6875570592f6962812cbd83abec07ff040aa
Author: Joel-Haeberli <haebu@rubigen.ch>
AuthorDate: Wed May 22 00:12:31 2024 +0200
fix: last retry will be set infinitely often
---
c2ec/proc-retrier.go | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/c2ec/proc-retrier.go b/c2ec/proc-retrier.go
index 0122b87..e54dc4a 100644
--- a/c2ec/proc-retrier.go
+++ b/c2ec/proc-retrier.go
@@ -52,14 +52,20 @@ func retryCallback(n *Notification, errs chan error) {
return
}
- withdrawal, err := DB.GetWithdrawalById(withdrawalId)
+ w, err := DB.GetWithdrawalById(withdrawalId)
if err != nil {
LogError("proc-retrier", err)
errs <- err
return
}
- attest(withdrawal, errs)
+ var lastRetryTs int64 = 0
+ if w.LastRetryTs != nil {
+ lastRetryTs = *w.LastRetryTs
+ }
+ if ShouldStartRetry(time.Unix(lastRetryTs, 0), int(w.RetryCounter),
CONFIG.Server.RetryDelayMs) {
+ attest(w, errs)
+ }
}
func attest(withdrawal *Withdrawal, errs chan error) {
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.