summaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/taler-merchant-httpd_private-get-orders-ID.c15
1 files changed, 14 insertions, 1 deletions
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",