[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] branch master updated: fix private get order id long po
From: |
gnunet |
Subject: |
[taler-merchant] branch master updated: fix private get order id long polling logic |
Date: |
Tue, 16 Mar 2021 22:06:55 +0100 |
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 e2b2e608 fix private get order id long polling logic
e2b2e608 is described below
commit e2b2e60859f0158f0e12cd55ca5cde8b00f7e862
Author: Christian Grothoff <grothoff@gnunet.org>
AuthorDate: Tue Mar 16 22:06:52 2021 +0100
fix private get order id long polling logic
---
src/backend/taler-merchant-httpd_private-get-orders-ID.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/src/backend/taler-merchant-httpd_private-get-orders-ID.c
b/src/backend/taler-merchant-httpd_private-get-orders-ID.c
index 6d4d625c..e7f6a1a0 100644
--- a/src/backend/taler-merchant-httpd_private-get-orders-ID.c
+++ b/src/backend/taler-merchant-httpd_private-get-orders-ID.c
@@ -1061,6 +1061,19 @@ TMH_private_get_orders_ID (const struct
TMH_RequestHandler *rh,
if ( (! paid) &&
(! order_only) )
{
+ if (0 != GNUNET_TIME_absolute_get_remaining
(gorc->sc.long_poll_timeout).rel_value_us)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Suspending GET /private/orders/%s\n",
+ hc->infix);
+ TMH_long_poll_suspend (hc->infix,
+ gorc->session_id,
+ gorc->fulfillment_url,
+ hc->instance,
+ &gorc->sc,
+ NULL);
+ return MHD_YES;
+ }
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Order %s claimed but not paid yet\n",
hc->infix);
@@ -1102,7 +1115,7 @@ TMH_private_get_orders_ID (const struct
TMH_RequestHandler *rh,
}
if ( (! paid) &&
- (0 != gorc->sc.long_poll_timeout.abs_value_us) )
+ (0 != GNUNET_TIME_absolute_get_remaining
(gorc->sc.long_poll_timeout).rel_value_us) )
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Suspending GET /private/orders/%s\n",
--
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 private get order id long polling logic,
gnunet <=