diff --git a/record-daemon/src/lqp/client.rs b/record-daemon/src/lqp/client.rs index a426e09..a6660cb 100644 --- a/record-daemon/src/lqp/client.rs +++ b/record-daemon/src/lqp/client.rs @@ -523,7 +523,7 @@ impl LqpClient { tokio::spawn(async move { // Small delay to ensure connection is stable tokio::time::sleep(tokio::time::Duration::from_millis(100)).await; - + let mut last_event_id: Option = None; let mut poll_count = 0u32; diff --git a/record-daemon/src/main.rs b/record-daemon/src/main.rs index b35ae74..85f1250 100644 --- a/record-daemon/src/main.rs +++ b/record-daemon/src/main.rs @@ -208,14 +208,14 @@ impl Daemon { Some(true) => { // Client started - try to connect info!("League Client detected"); - + if let Some(creds) = watcher.credentials() { match self.lqp_client.connect(creds.clone()).await { Ok(()) => { // Only transition to Monitoring after successful connection self.state_machine .transition(StateTransition::ClientStarted); - + if let Err(e) = self.lqp_client.start_event_listener().await { warn!("Failed to start event listener: {}", e); // Still stay in Monitoring, will retry on next check @@ -253,7 +253,7 @@ impl Daemon { self.state_machine .transition(StateTransition::ClientStarted); } - + if let Err(e) = self.lqp_client.start_event_listener().await { warn!("Failed to start event listener on reconnect: {}", e); } else {