taler-mdb

GNU Taler Extensions and Integrations
Log | Files | Refs | Submodules | README | LICENSE

commit 11f22a4394efee08d832fbebab4f961d1bf5f578
parent dc35388eaf7b09f3eb069036212137ce70a195d2
Author: Christian Grothoff <christian@grothoff.org>
Date:   Wed, 18 May 2022 18:33:57 +0200

do not react badly if we get a gateway timeout, also limit long polling to a value most http proxies will support nicely

Diffstat:
Msrc/main.c | 9+++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/main.c b/src/main.c @@ -74,15 +74,14 @@ along with */ #define _(s) (s) -/* FIXME Adjusted Time out because low internet connection at 36C3 */ #define BACKEND_POLL_TIMEOUT GNUNET_TIME_relative_multiply ( \ - GNUNET_TIME_UNIT_MINUTES, 5) + GNUNET_TIME_UNIT_SECONDS, 30) /** * Set payment deadline below what will work with the snack machine. */ #define PAY_TIMEOUT GNUNET_TIME_relative_multiply ( \ - GNUNET_TIME_UNIT_MINUTES, 1) + GNUNET_TIME_UNIT_MINUTES, 2) /** * How long could it take at most for us to notify the Taler merchant @@ -1473,7 +1472,9 @@ check_payment_cb (void *cls, GNUNET_assert (payment_activity == pa); pa->ogh = NULL; - if (MHD_HTTP_OK != hr->http_status) + if ( (MHD_HTTP_OK != hr->http_status) && + (MHD_HTTP_GATEWAY_TIMEOUT != hr->http_status) && + (MHD_HTTP_REQUEST_TIMEOUT != hr->http_status) ) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Backend request to /check-payment failed: %u/%d\n",