From 9d5549d6ba06d34597f00da21d19c6375a70f8aa Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 9 Mar 2023 19:48:29 +0100 Subject: [PATCH] retry on failure --- contrib/gana | 2 +- src/exchange/taler-exchange-httpd.c | 20 +++++++++++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/contrib/gana b/contrib/gana index 02132eded..e2c325ca8 160000 --- a/contrib/gana +++ b/contrib/gana @@ -1 +1 @@ -Subproject commit 02132ededc12a0a1cfd81f0ca76c384304e15259 +Subproject commit e2c325ca89b92aed98a30b23fd653b1adb9af683 diff --git a/src/exchange/taler-exchange-httpd.c b/src/exchange/taler-exchange-httpd.c index c88ddd7c8..d247d981b 100644 --- a/src/exchange/taler-exchange-httpd.c +++ b/src/exchange/taler-exchange-httpd.c @@ -80,6 +80,11 @@ */ #define UNIX_BACKLOG 50 +/** + * How often will we try to connect to the database before giving up? + */ +#define MAX_DB_RETRIES 5 + /** * Above what request latency do we start to log? */ @@ -1965,11 +1970,20 @@ exchange_serve_process_config (void) GNUNET_free (attr_enc_key_str); } - if (NULL == - (TEH_plugin = TALER_EXCHANGEDB_plugin_load (TEH_cfg))) + for (unsigned int i = 0; i