Only spin-wait MainchainRPCCheck on initial loading with warmup code

This commit is contained in:
Gregory Sanders 2019-05-06 09:39:29 -04:00
parent 9d4097dca2
commit ad43f9c60f

View file

@ -5161,7 +5161,8 @@ bool MainchainRPCCheck(const bool init)
if (!error.isNull()) {
// On the first call, it's possible to node is still in
// warmup; in that case, just wait and retry.
if (error["code"].get_int() == RPC_IN_WARMUP) {
// If this is not the initial call, just report failure.
if (init && error["code"].get_int() == RPC_IN_WARMUP) {
MilliSleep(1000);
continue;
}