From df02047855a345742cc57988ae971eb47bc1a93f Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 28 Jan 2024 20:15:38 +0100 Subject: -fix timeout if there were results --- src/backend/taler-merchant-wirewatch.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/backend') diff --git a/src/backend/taler-merchant-wirewatch.c b/src/backend/taler-merchant-wirewatch.c index a40a3e90..f78bbbb9 100644 --- a/src/backend/taler-merchant-wirewatch.c +++ b/src/backend/taler-merchant-wirewatch.c @@ -367,8 +367,10 @@ credit_cb ( &details->amount, details->credit_account_uri, true /* confirmed */); - if (0 == qs) + if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs) { + /* FIXME: this *also* logs if the entry simply + already exists. Modify code to distinguish! */ GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Inserting transfer for %s into database failed. Is the credit account %s configured correctly?\n", w->instance_id, @@ -400,7 +402,8 @@ credit_cb ( case MHD_HTTP_NO_CONTENT: save (w); /* Delay artificially if server returned before long-poll timeout */ - w->delay = GNUNET_TIME_absolute_get_remaining (w->long_poll_timeout); + if (! w->found) + w->delay = GNUNET_TIME_absolute_get_remaining (w->long_poll_timeout); break; case MHD_HTTP_NOT_FOUND: /* configuration likely wrong, wait at least 1 minute, backoff up to 15 minutes! */ -- cgit v1.2.3