diff --git a/sfsmcctl/Cargo.toml b/sfsmcctl/Cargo.toml index 055be27..413ec74 100644 --- a/sfsmcctl/Cargo.toml +++ b/sfsmcctl/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" [dependencies] clap = { version = "2.33", features = ["wrap_help", "color"] } toml = "0.5" -tokio = { version = "0.3", features = ["full"] } +tokio = { version = "0.2", features = ["full"] } async-minecraft-ping = "0.2" dbus = { version = "0.9", features = ["futures"] } dbus-tokio = "0.6" diff --git a/sfsmcd/Cargo.toml b/sfsmcd/Cargo.toml index 7c40c0b..aa6f382 100644 --- a/sfsmcd/Cargo.toml +++ b/sfsmcd/Cargo.toml @@ -8,7 +8,7 @@ edition = "2018" [dependencies] actix-web = "3.2" toml = "0.5" -tokio = { version = "0.3", features = ["full"] } +tokio = { version = "0.2", features = ["full"] } async-minecraft-ping = "0.2" dbus = { version = "0.9", features = ["futures"] } dbus-tokio = "0.6" diff --git a/sfsmcd/src/main.rs b/sfsmcd/src/main.rs index 7a470ab..52cb987 100644 --- a/sfsmcd/src/main.rs +++ b/sfsmcd/src/main.rs @@ -19,10 +19,12 @@ fn iface_name(iface: &str) -> String { DBUS_NAME.to_owned() + "." + iface } -fn iface_rt() -> Arc { +// fn iface_rt() -> Arc { +fn iface_rt() -> tokio::runtime::Handle { IFACE_RT_INIT.call_once(|| { unsafe { - IFACE_RT = Some(Arc::new(tokio::runtime::Builder::new_multi_thread() + // IFACE_RT = Some(Arc::new(tokio::runtime::Builder::new_multi_thread() + IFACE_RT = Some(Arc::new(tokio::runtime::Builder::new() .thread_name("iface-runtime-worker") .build() .unwrap() @@ -31,7 +33,8 @@ fn iface_rt() -> Arc { }); unsafe { - IFACE_RT.clone().unwrap() + // IFACE_RT.clone().unwrap() + IFACE_RT.clone().map(|x| x.handle().clone()).unwrap() } }