gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated: fix overflow


From: gnunet
Subject: [taler-exchange] branch master updated: fix overflow
Date: Thu, 01 Apr 2021 10:57:06 +0200

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

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new 7c485a21 fix overflow
7c485a21 is described below

commit 7c485a21537c13132fadefae1787bd01c1bc195a
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Thu Apr 1 10:57:04 2021 +0200

    fix overflow
---
 src/lib/exchange_api_handle.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/lib/exchange_api_handle.c b/src/lib/exchange_api_handle.c
index a6e6e9a4..fbb33eb2 100644
--- a/src/lib/exchange_api_handle.c
+++ b/src/lib/exchange_api_handle.c
@@ -1863,8 +1863,14 @@ TALER_EXCHANGE_connect (
 static long
 get_keys_timeout_seconds (struct TALER_EXCHANGE_Handle *exchange)
 {
-  return GNUNET_MIN (60,
-                     5 + (1L << exchange->keys_error_count));
+  unsigned int kec;
+
+  /* if retry counter >= 8, do not bother to go further, we
+     stop the exponential back-off at 128 anyway. */
+  kec = GNUNET_MIN (7,
+                    exchange->keys_error_count);
+  return GNUNET_MIN (120,
+                     5 + (1L << kec));
 }
 
 

-- 
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]