mirror of
https://github.com/mimblewimble/grin.git
synced 2025-03-14 04:51:09 +03:00
sleep for 10s in syncer when not syncing (#1705)
This commit is contained in:
parent
01735544ac
commit
4a1e3c27bb
1 changed files with 2 additions and 1 deletions
|
@ -124,9 +124,10 @@ fn sync_loop(
|
||||||
highest_height = most_work_height;
|
highest_height = most_work_height;
|
||||||
}
|
}
|
||||||
|
|
||||||
// quick short-circuit if no syncing is needed
|
// quick short-circuit (and a decent sleep) if no syncing is needed
|
||||||
if !syncing {
|
if !syncing {
|
||||||
sync_state.update(SyncStatus::NoSync);
|
sync_state.update(SyncStatus::NoSync);
|
||||||
|
thread::sleep(time::Duration::from_secs(10));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue