mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-12-22 19:49:32 +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 {}. " +
|
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);
|
"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);
|
request(true);
|
||||||
}, thisRetryDelay);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// returns true if provider selection loops back to beginning
|
// returns true if provider selection loops back to beginning
|
||||||
|
|
Loading…
Reference in a new issue