From 0255e1cfefa0d45e907aa3368792757a3ffa03dd Mon Sep 17 00:00:00 2001 From: alterdekim Date: Sun, 13 Oct 2024 19:44:47 +0300 Subject: [PATCH] modified: src/client.rs --- src/client.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client.rs b/src/client.rs index 3ad85da..e6bc217 100644 --- a/src/client.rs +++ b/src/client.rs @@ -52,7 +52,7 @@ pub async fn client_mode(client_config: ClientConfiguration, fd: i32, close_toke _ = listen_dr => { return; } - rr = dev_reader.read(&mut buf) { + rr = dev_reader.read(&mut buf) => { if let Ok(n) = rr { info!("Read from tun."); // hex::encode(&buf[..n]) dx.send(buf[..n].to_vec()).unwrap(); @@ -136,7 +136,7 @@ pub async fn client_mode(client_config: ClientConfiguration, fd: i32, close_toke info!("Cancellation token has been thrown"); cancel_sr.send(()); cancel_dr.send(()); - break; + return; } rr = rx.recv() => { if let Some(bytes) = rr {