improved robustness of pixel buds plugin

This commit is contained in:
2026-04-01 17:54:16 +02:00
parent c8a50d7b67
commit 81c9b78cb3
4 changed files with 334 additions and 206 deletions
+3 -1
View File
@@ -89,11 +89,13 @@ pub async fn run_daemon(config_path: Option<PathBuf>) -> Result<()> {
// 4. Bluetooth Task
let poll_state = Arc::clone(&state);
let poll_config = Arc::clone(&config);
tokio::spawn(async move {
info!("Starting Bluetooth polling task");
let mut daemon = BtDaemon::new();
loop {
daemon.poll(Arc::clone(&poll_state)).await;
let config = poll_config.read().await;
daemon.poll(Arc::clone(&poll_state), &config).await;
sleep(Duration::from_secs(1)).await;
}
});