[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] branch master updated: fix #9184: never long-poll on fi
From: |
gnunet |
Subject: |
[taler-merchant] branch master updated: fix #9184: never long-poll on first request |
Date: |
Fri, 13 Sep 2024 20:35:44 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new 6191cf20 fix #9184: never long-poll on first request
6191cf20 is described below
commit 6191cf20fe3b1c0154c1b972a5465361ee744d3a
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Fri Sep 13 20:35:28 2024 +0200
fix #9184: never long-poll on first request
---
src/backend/taler-merchant-kyccheck.c | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/src/backend/taler-merchant-kyccheck.c
b/src/backend/taler-merchant-kyccheck.c
index 7d6b7558..e97e2702 100644
--- a/src/backend/taler-merchant-kyccheck.c
+++ b/src/backend/taler-merchant-kyccheck.c
@@ -35,16 +35,16 @@
* long-polling and do not want to wake up too often.
*/
#define EXCHANGE_TIMEOUT GNUNET_TIME_relative_multiply ( \
- GNUNET_TIME_UNIT_MINUTES, \
- 30)
+ GNUNET_TIME_UNIT_MINUTES, \
+ 30)
/**
* How long do we wait between requests if all we wait
* for is a change in the AML investigation status?
*/
#define AML_FREQ GNUNET_TIME_relative_multiply ( \
- GNUNET_TIME_UNIT_HOURS, \
- 6)
+ GNUNET_TIME_UNIT_HOURS, \
+ 6)
/**
* How many inquiries do we process concurrently at most.
@@ -212,6 +212,11 @@ struct Inquiry
*/
enum TALER_ErrorCode last_ec;
+ /**
+ * True if this is not our first time we make this request.
+ */
+ bool not_first_time;
+
/**
* Did we not run this inquiry due to limits?
*/
@@ -586,6 +591,7 @@ exchange_check_cb (
GNUNET_SCHEDULER_shutdown ();
return;
}
+ i->not_first_time = true;
}
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Will repeat inquiry in %s\n",
@@ -639,13 +645,17 @@ inquiry_work (void *cls)
lpt = TALER_EXCHANGE_KLPT_KYC_OK;
else if (i->aml_review)
lpt = TALER_EXCHANGE_KLPT_INVESTIGATION_DONE;
+ if (! i->not_first_time)
+ lpt = TALER_EXCHANGE_KLPT_NONE;
i->kyc = TALER_EXCHANGE_kyc_check (
ctx,
i->e->keys->exchange_url,
&i->a->h_payto,
&i->a->ap,
lpt,
- EXCHANGE_TIMEOUT,
+ i->not_first_time
+ ? EXCHANGE_TIMEOUT
+ : GNUNET_TIME_UNIT_ZERO,
&exchange_check_cb,
i);
if (NULL == i->kyc)
@@ -743,6 +753,8 @@ start_inquiry (struct Exchange *e,
GNUNET_SCHEDULER_shutdown ();
return;
}
+ if (qs > 0)
+ i->not_first_time = true;
switch (i->last_http_status)
{
case MHD_HTTP_OK:
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-merchant] branch master updated: fix #9184: never long-poll on first request,
gnunet <=