From c13810ba2c43a63504269c646b438c2fd157d4ff Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 20 Oct 2021 16:01:11 +0200 Subject: fix #7049: immediate restart of MHD when already running --- src/bank-lib/bank_api_credit.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/bank-lib/bank_api_credit.c') diff --git a/src/bank-lib/bank_api_credit.c b/src/bank-lib/bank_api_credit.c index 91fbe506d..eff2ad971 100644 --- a/src/bank-lib/bank_api_credit.c +++ b/src/bank-lib/bank_api_credit.c @@ -29,6 +29,13 @@ #include "taler_signatures.h" +/** + * How much longer than the application-specified timeout + * do we wait (giving the server a chance to respond)? + */ +#define GRACE_PERIOD_MS 1000 + + /** * @brief A /history/incoming Handle */ @@ -66,7 +73,7 @@ struct TALER_BANK_CreditHistoryHandle * were set, * #GNUNET_SYSERR if there was a protocol violation in @a history */ -static int +static enum GNUNET_GenericReturnValue parse_account_history (struct TALER_BANK_CreditHistoryHandle *hh, const json_t *history) { @@ -305,7 +312,7 @@ TALER_BANK_credit_history (struct GNUNET_CURL_Context *ctx, GNUNET_break (CURLE_OK == curl_easy_setopt (eh, CURLOPT_TIMEOUT_MS, - (long) tms)); + (long) tms + GRACE_PERIOD_MS)); } hh->job = GNUNET_CURL_job_add2 (ctx, eh, -- cgit v1.2.3