Sleep for only one second if the gtk sender can't be found #70

Merged
savanni merged 1 commits from savanni/dashboard/fix-startup into main 2023-09-21 13:39:54 +00:00
1 changed files with 3 additions and 3 deletions
Showing only changes of commit 3d460e5840 - Show all commits

View File

@ -110,8 +110,10 @@ pub fn main() {
if let Some(ref gtk_tx) = *core.tx.read().unwrap() {
let _ = gtk_tx.send(Message::Refresh(state.clone()));
std::thread::sleep(std::time::Duration::from_secs(60));
} else {
std::thread::sleep(std::time::Duration::from_secs(1));
}
std::thread::sleep(std::time::Duration::from_secs(60));
}
}
});
@ -134,8 +136,6 @@ pub fn main() {
Continue(true)
}
});
std::thread::spawn(move || {});
});
let args: Vec<String> = env::args().collect();