diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-10-20 16:01:11 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-10-20 16:01:11 +0200 |
commit | c13810ba2c43a63504269c646b438c2fd157d4ff (patch) | |
tree | 4433bcb4792e0310be7f3a8d3c80a33c777ae555 /src/bank-lib/bank_api_credit.c | |
parent | c75a3a1921b84e000d73f7715e31049717dc6232 (diff) | |
download | exchange-c13810ba2c43a63504269c646b438c2fd157d4ff.tar.xz |
fix #7049: immediate restart of MHD when already running
Diffstat (limited to 'src/bank-lib/bank_api_credit.c')
-rw-r--r-- | src/bank-lib/bank_api_credit.c | 11 |
1 files changed, 9 insertions, 2 deletions
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 @@ -30,6 +30,13 @@ /** + * 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 */ struct TALER_BANK_CreditHistoryHandle @@ -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, |