From 39f86817e0d7d46e8b560fc47fdeb24d8ab6603f Mon Sep 17 00:00:00 2001 From: woodser Date: Sat, 7 Jan 2023 13:50:14 -0500 Subject: [PATCH] fetch prices on same thread if 0 delay --- .../java/bisq/core/provider/price/PriceFeedService.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/bisq/core/provider/price/PriceFeedService.java b/core/src/main/java/bisq/core/provider/price/PriceFeedService.java index 319aa9da..7f5b81a4 100644 --- a/core/src/main/java/bisq/core/provider/price/PriceFeedService.java +++ b/core/src/main/java/bisq/core/provider/price/PriceFeedService.java @@ -252,9 +252,14 @@ public class PriceFeedService { } log.warn("We received an error at the request from provider {}. " + "We select the new provider {} and use that for a new request in {} sec.", oldBaseUrl, priceProvider.getBaseUrl(), thisRetryDelay); - UserThread.runAfter(() -> { + if (thisRetryDelay > 0) { + UserThread.runAfter(() -> { + log.warn("Running request!"); + request(true); + }, thisRetryDelay); + } else { request(true); - }, thisRetryDelay); + } } // returns true if provider selection loops back to beginning