diff --git a/src-tauri/src/core/core.rs b/src-tauri/src/core/core.rs index 4817fea..dc747d2 100644 --- a/src-tauri/src/core/core.rs +++ b/src-tauri/src/core/core.rs @@ -221,7 +221,7 @@ impl CoreManager { if let AmbientLightMode::Follow = *lock { drop(lock); let screenshot = picker.take_screenshot()?; - info!("Take Screenshot Spend: {:?}", start.elapsed()); + // info!("Take Screenshot Spend: {:?}", start.elapsed()); match tx.send(screenshot).await { Ok(_) => {} Err(err) => { diff --git a/src-tauri/src/rpc/mqtt.rs b/src-tauri/src/rpc/mqtt.rs index 6be8f9b..a154a84 100644 --- a/src-tauri/src/rpc/mqtt.rs +++ b/src-tauri/src/rpc/mqtt.rs @@ -1,5 +1,5 @@ use rumqttc::{AsyncClient, MqttOptions, QoS}; -use std::{time::Duration}; +use std::time::Duration; use time::{format_description, OffsetDateTime}; use tokio::task; use tracing::warn; @@ -15,8 +15,13 @@ impl MqttConnection { let (client, mut eventloop) = AsyncClient::new(options, 10); task::spawn(async move { - while let Ok(notification) = eventloop.poll().await { - // println!("Received = {:?}", notification); + loop { + match eventloop.poll().await { + Ok(_) => {} + Err(err) => { + println!("MQTT Error Event = {:?}", err); + } + } } }); Self { client } @@ -29,7 +34,8 @@ impl MqttConnection { async fn subscribe_board(&self) { self.client - .subscribe("display-ambient-light/board/#", QoS::AtMostOnce).await; + .subscribe("display-ambient-light/board/#", QoS::AtMostOnce) + .await; } fn broadcast_desktop_online(&mut self) {