fix overflow
This commit is contained in:
parent
ec0b1b512c
commit
7c485a2153
@ -1863,8 +1863,14 @@ TALER_EXCHANGE_connect (
|
|||||||
static long
|
static long
|
||||||
get_keys_timeout_seconds (struct TALER_EXCHANGE_Handle *exchange)
|
get_keys_timeout_seconds (struct TALER_EXCHANGE_Handle *exchange)
|
||||||
{
|
{
|
||||||
return GNUNET_MIN (60,
|
unsigned int kec;
|
||||||
5 + (1L << exchange->keys_error_count));
|
|
||||||
|
/* 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));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user