From 4a1e3c27bb9236b2d8a7cd2d0093520645fe06cd Mon Sep 17 00:00:00 2001 From: Antioch Peverell Date: Tue, 9 Oct 2018 21:50:55 +0100 Subject: [PATCH] sleep for 10s in syncer when not syncing (#1705) --- servers/src/grin/sync/syncer.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/servers/src/grin/sync/syncer.rs b/servers/src/grin/sync/syncer.rs index 024afdf11..0fa60e1be 100644 --- a/servers/src/grin/sync/syncer.rs +++ b/servers/src/grin/sync/syncer.rs @@ -124,9 +124,10 @@ fn sync_loop( 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 { sync_state.update(SyncStatus::NoSync); + thread::sleep(time::Duration::from_secs(10)); continue; }