From 832083ac48ac42e79a360de4bd73c9325e95504b Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Wed, 6 Mar 2024 23:14:54 -0800 Subject: [PATCH] refactor: give ownership of app_handle to create_subscription, which runs forever --- client/src-tauri/src/main.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client/src-tauri/src/main.rs b/client/src-tauri/src/main.rs index f328956..82fab0f 100644 --- a/client/src-tauri/src/main.rs +++ b/client/src-tauri/src/main.rs @@ -22,8 +22,7 @@ fn main() { let app_handle = app.app_handle(); tokio::spawn(async move { - crate::telemetry::subscribe_topics(app_handle.clone(), NTABLE_IP, NTABLE_PORT) - .await; + crate::telemetry::subscribe_topics(app_handle, NTABLE_IP, NTABLE_PORT).await; }); Ok(())