commit 72ade7bc90916061574f432e009b0554b70c2f87
parent 7f8aa41a2a05e5de264c1a9fe13be10450ac2e1b
Author: Christian Grothoff <christian@grothoff.org>
Date: Sun, 4 Jan 2026 16:38:36 +0100
retry more aggressively on HTTP failures (fixes #10850)
Diffstat:
2 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/src/exchange/taler-exchange-wirewatch.c b/src/exchange/taler-exchange-wirewatch.c
@@ -64,6 +64,12 @@ static bool hh_returned_data;
static bool hh_account_404;
/**
+ * Set to true if the request for history did not
+ * succeed because of some unexpected HTTP request error.
+ */
+static bool hh_error;
+
+/**
* When did we start the last @e hh request?
*/
static struct GNUNET_TIME_Absolute hh_start_time;
@@ -123,6 +129,11 @@ static struct GNUNET_TIME_Relative longpoll_timeout;
static struct GNUNET_TIME_Relative h404_backoff;
/**
+ * How long do we wait on HTTP history request errors.
+ */
+static struct GNUNET_TIME_Relative hh_error_backoff;
+
+/**
* Name of our job in the shard table.
*/
static char *job_name;
@@ -483,7 +494,7 @@ transaction_completed (void)
GNUNET_SCHEDULER_shutdown ();
return;
}
- if (! (hh_returned_data || hh_account_404) )
+ if (! (hh_returned_data || hh_account_404 || hh_error) )
{
/* Enforce long-polling delay even if the server ignored it
and returned earlier */
@@ -511,6 +522,16 @@ transaction_completed (void)
{
h404_backoff = GNUNET_TIME_UNIT_ZERO;
}
+ if (hh_error)
+ {
+ hh_error_backoff = GNUNET_TIME_STD_BACKOFF (hh_error_backoff);
+ delayed_until = GNUNET_TIME_relative_to_absolute (
+ hh_error_backoff);
+ }
+ else
+ {
+ hh_error_backoff = GNUNET_TIME_UNIT_ZERO;
+ }
if (test_mode)
delayed_until = GNUNET_TIME_UNIT_ZERO_ABS;
GNUNET_assert (NULL == task);
@@ -818,6 +839,7 @@ history_cb (void *cls,
}
break;
default:
+ hh_error = true;
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Error fetching history: %s (%u)\n",
TALER_ErrorCode_get_hint (reply->ec),
@@ -850,6 +872,7 @@ continue_with_shard (void *cls)
hh_start_time = GNUNET_TIME_absolute_get ();
hh_returned_data = false;
hh_account_404 = false;
+ hh_error = false;
hh = TALER_BANK_credit_history (ctx,
ai->auth,
latest_row_off,
diff --git a/src/mhd/mhd_typst.c b/src/mhd/mhd_typst.c
@@ -370,7 +370,7 @@ complete_response (void *cls)
NULL,
NULL,
NULL,
- "pdftk",
+ argv[0],
(char **) argv);
if (NULL == tc->proc)
{