From 9d5549d6ba06d34597f00da21d19c6375a70f8aa Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 9 Mar 2023 19:48:29 +0100 Subject: retry on failure --- src/exchange/taler-exchange-httpd.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'src') 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