mirror of
https://github.com/boldsuck/haveno.git
synced 2024-12-22 20:19:21 +00:00
fetch prices on same thread if 0 delay
This commit is contained in:
parent
3e0473719b
commit
39f86817e0
1 changed files with 7 additions and 2 deletions
|
@ -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);
|
||||
if (thisRetryDelay > 0) {
|
||||
UserThread.runAfter(() -> {
|
||||
log.warn("Running request!");
|
||||
request(true);
|
||||
}, thisRetryDelay);
|
||||
} else {
|
||||
request(true);
|
||||
}
|
||||
}
|
||||
|
||||
// returns true if provider selection loops back to beginning
|
||||
|
|
Loading…
Reference in a new issue