mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-12-23 03:59:36 +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);
|
||||||
|
if (thisRetryDelay > 0) {
|
||||||
UserThread.runAfter(() -> {
|
UserThread.runAfter(() -> {
|
||||||
|
log.warn("Running request!");
|
||||||
request(true);
|
request(true);
|
||||||
}, thisRetryDelay);
|
}, thisRetryDelay);
|
||||||
|
} else {
|
||||||
|
request(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// returns true if provider selection loops back to beginning
|
// returns true if provider selection loops back to beginning
|
||||||
|
|
Loading…
Reference in a new issue