node: restart with 0 peers and running status
This commit is contained in:
parent
2bb51d6757
commit
c469fec4e0
1 changed files with 6 additions and 0 deletions
|
@ -287,6 +287,12 @@ impl Node {
|
||||||
NODE_STATE.starting.store(false, Ordering::Relaxed);
|
NODE_STATE.starting.store(false, Ordering::Relaxed);
|
||||||
first_start = false;
|
first_start = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Restart node on running status and 0 peers (usual case for Mobile).
|
||||||
|
if stats.peer_count == 0 && stats.sync_status == SyncStatus::NoSync {
|
||||||
|
Node::restart();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if stratum_start_requested && NODE_STATE.stratum_stats.read().is_running {
|
if stratum_start_requested && NODE_STATE.stratum_stats.read().is_running {
|
||||||
|
|
Loading…
Reference in a new issue