diff options
m--------- | contrib/wallet-core | 0 | ||||
-rw-r--r-- | src/backend/taler-merchant-httpd_exchanges.c | 28 | ||||
-rw-r--r-- | src/backend/taler-merchant-httpd_private-post-orders.c | 3 |
3 files changed, 18 insertions, 13 deletions
diff --git a/contrib/wallet-core b/contrib/wallet-core -Subproject 2347be694c713959528ad59f3f157d866d7ad42 +Subproject 5bc771e151df3145e61c017b3bc816c58ad9496 diff --git a/src/backend/taler-merchant-httpd_exchanges.c b/src/backend/taler-merchant-httpd_exchanges.c index c9b6cc70..8a89235a 100644 --- a/src/backend/taler-merchant-httpd_exchanges.c +++ b/src/backend/taler-merchant-httpd_exchanges.c @@ -859,18 +859,6 @@ TMH_EXCHANGES_keys4exchange ( fo); return fo; } - if ( (NULL == exchange->retry_task) && - (NULL == exchange->conn) ) - { - GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "No valid keys, fetching /keys at %s\n", - GNUNET_TIME_absolute2s (exchange->first_retry)); - exchange->retry_task - = GNUNET_SCHEDULER_add_at (exchange->first_retry, - &retry_exchange, - exchange); - return fo; - } if ( (NULL == exchange->conn) && ( (ESTATE_FAILED == exchange->state) || (ESTATE_REDOWNLOADING_FAILURE == exchange->state) ) ) @@ -883,6 +871,22 @@ TMH_EXCHANGES_keys4exchange ( fo); return fo; } + if ( (force_download) && + (GNUNET_TIME_absolute_is_future (exchange->first_retry)) && + (ESTATE_DOWNLOADED == exchange->state) ) + { + /* Return results immediately. */ + fo->at = GNUNET_SCHEDULER_add_now (&return_keys, + fo); + /* *no* return here, we MAY schedule a 'retry_task' in the + next block if there isn't one yet */ + } + if ( (NULL == exchange->retry_task) && + (NULL == exchange->conn) ) + exchange->retry_task + = GNUNET_SCHEDULER_add_at (exchange->first_retry, + &retry_exchange, + exchange); GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Next %skeys (%d) request scheduled for %s\n", exchange->url, diff --git a/src/backend/taler-merchant-httpd_private-post-orders.c b/src/backend/taler-merchant-httpd_private-post-orders.c index d46bfa85..5f06eee2 100644 --- a/src/backend/taler-merchant-httpd_private-post-orders.c +++ b/src/backend/taler-merchant-httpd_private-post-orders.c @@ -1141,7 +1141,8 @@ set_exchanges (struct OrderContext *oc) if (NULL != oc->pending_reload_head) { GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "Still trying to re-load /keys\n"); + "Still trying to (re)load %skeys\n", + oc->pending_reload_head->url); MHD_suspend_connection (oc->connection); oc->suspended = GNUNET_YES; GNUNET_CONTAINER_DLL_insert (oc_head, |