changed the oneshot of tokio to mpsc of std

This commit is contained in:
asxalex 2024-07-14 20:12:29 +08:00
parent 125f23792f
commit 6a5aba6ae5
2 changed files with 3 additions and 3 deletions

View File

@ -10,7 +10,7 @@ use tokio::sync::oneshot;
async fn main() {
let _guard = log::init_log();
let (tx, rx) = oneshot::channel();
let (tx, rx) = std::sync::mpsc::channel();
let _ = run_sdlan(
CommandLine {
sn: "39.98.184.67:1265".to_owned(),
@ -27,7 +27,7 @@ async fn main() {
}, tx,
).await;
rx.await;
rx.recv();
let edge = get_edge();
edge.start("0".to_owned()).await;

View File

@ -22,7 +22,7 @@ use sdlan_sn_rs::{
pub async fn run_sdlan(
args: CommandLine,
sender: tokio::sync::oneshot::Sender<bool>,
sender: std::sync::mpsc::Sender<bool>,
// start_stop_sender: Sender<String>,
// start_stop_receiver: Receiver<String>,
) -> Result<()> {