From f174781b570bb534db424e57a3b563a74ad36f77 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 12 Aug 2021 13:13:42 +0200 Subject: support long_poll_ms argument in bank API (#6987) --- src/exchange/taler-exchange-wirewatch.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/exchange') diff --git a/src/exchange/taler-exchange-wirewatch.c b/src/exchange/taler-exchange-wirewatch.c index cc99e42c3..2993999a8 100644 --- a/src/exchange/taler-exchange-wirewatch.c +++ b/src/exchange/taler-exchange-wirewatch.c @@ -30,6 +30,12 @@ #include "taler_bank_service.h" +/** + * How long to wait for an HTTP reply if there + * are no transactions pending at the server? + */ +#define LONGPOLL_TIMEOUT GNUNET_TIME_UNIT_MINUTES + /** * What is the maximum batch size we use for credit history * requests with the bank. See `batch_size` below. @@ -545,7 +551,7 @@ history_cb (void *cls, &details->reserve_pub, &details->amount, details->execution_date, - details->debit_account_url, + details->debit_account_uri, wa->ai->section_name, serial_id); switch (qs) @@ -674,6 +680,9 @@ find_transfers (void *cls) wa_pos->ai->auth, wa_pos->batch_start, limit, + test_mode + ? GNUNET_TIME_UNIT_ZERO + : LONGPOLL_TIMEOUT, &history_cb, wa_pos); if (NULL == wa_pos->hh) -- cgit v1.2.3