From f9224ff02e688dec819ab81893320a0611f2a198 Mon Sep 17 00:00:00 2001
From: FxQnLr <felixquinn03@gmail.com>
Date: Tue, 24 Oct 2023 14:56:17 +0200
Subject: Seems to work

---
 src/routes/start.rs | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

(limited to 'src/routes')

diff --git a/src/routes/start.rs b/src/routes/start.rs
index b45fe5b..863ef16 100644
--- a/src/routes/start.rs
+++ b/src/routes/start.rs
@@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize};
 use std::sync::Arc;
 use axum::extract::State;
 use serde_json::{json, Value};
-use tracing::info;
+use tracing::{debug, info};
 use crate::auth::auth;
 use crate::config::SETTINGS;
 use crate::wol::{create_buffer, send_packet};
@@ -39,8 +39,12 @@ pub async fn start(State(state): State<Arc<crate::AppState>>, headers: HeaderMap
         )?;
 
         if payload.ping.is_some_and(|ping| ping) {
-            tokio::spawn(async move {crate::services::ping::spawn(state.ping_send.clone()).await});
-        }
+            debug!("ping true");
+            tokio::spawn(async move {
+                debug!("Init ping service");
+                crate::services::ping::spawn(state.ping_send.clone()).await
+            });
+        };
         Ok(Json(json!(StartResponse { id: device.id, boot: true })))
     } else {
         Err(WebolError::Generic)
-- 
cgit v1.2.3