From a3875721a2d1fd9b9cc87a60cf9a8811fa114cd8 Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Thu, 30 Nov 2023 17:24:25 +0100 Subject: [PATCH] fix high cpu load --- src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 45fffd7..f1eecd8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -24,7 +24,10 @@ fn main() { let radio_data_new = match flrig::get_radio_data(&settings.flrig.host, &settings.flrig.port) { Ok(res) => res, - Err(_) => continue, + Err(_) => { + thread::sleep(Duration::from_secs(3)); + continue; + } }; if radio_data_current.frequency != radio_data_new.frequency