refactor: give ownership of app_handle to create_subscription, which runs forever

This commit is contained in:
Youwen Wu 2024-03-06 23:14:54 -08:00
parent 48267f9af9
commit 832083ac48
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3

View file

@ -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(())