summaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2024-01-28 20:15:38 +0100
committerChristian Grothoff <christian@grothoff.org>2024-01-28 20:15:38 +0100
commitdf02047855a345742cc57988ae971eb47bc1a93f (patch)
tree3d0811e700623db8fdb4f8bf557d1259021f457f /src/backend
parenta519c6229c83ac8bcf405f1b96043f9e1eb396f9 (diff)
downloadmerchant-df02047855a345742cc57988ae971eb47bc1a93f.tar.gz
merchant-df02047855a345742cc57988ae971eb47bc1a93f.tar.bz2
merchant-df02047855a345742cc57988ae971eb47bc1a93f.zip
-fix timeout if there were results
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/taler-merchant-wirewatch.c7
1 files changed, 5 insertions, 2 deletions
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! */