diff --git a/src/main.rs b/src/main.rs index 3dd71c8..333cc88 100644 --- a/src/main.rs +++ b/src/main.rs @@ -97,15 +97,14 @@ async fn main_normal( async move {}.boxed() }) } - let _socket = socket.connect().await.expect("Connection failed"); + let _socket = socket.connect().await?; sleep(Duration::from_secs(10)); loop { info!("me request"); let _res = _socket .emit("me", json!({})) - .await - .expect("Server unreachable"); + .await; sleep(Duration::from_secs(60)); } } @@ -188,11 +187,11 @@ async fn main() -> Result<(), Box> { //} let _ = main_normal(main_args, main_config, main_robots).await; - Ok(()) + - //loop { - // tokio::time::sleep(Duration::from_secs(1)); - //} + loop { + tokio::time::sleep(Duration::from_secs(1)); + } } #[cfg(test)]