modified: src/client.rs
All checks were successful
gitea/Frida-android-native/pipeline/head This commit looks good

This commit is contained in:
Michael Wain 2024-10-13 19:09:21 +03:00
parent 1fb7915b17
commit ccbc0b3217

View File

@ -48,7 +48,7 @@ pub async fn client_mode(client_config: ClientConfiguration, fd: i32, close_toke
let mut buf = vec![0; 1400]; // mtu
loop {
if let Ok(n) = dev_reader.read(&mut buf).await {
info!("Read from tun. {:?}", hex::encode(&buf[..n]));
info!("Read from tun."); // hex::encode(&buf[..n])
dx.send(buf[..n].to_vec()).unwrap();
}
}
@ -117,6 +117,7 @@ pub async fn client_mode(client_config: ClientConfiguration, fd: i32, close_toke
loop {
tokio::select! {
_ = close_token.cancelled() => {
info!("Cancellation token has been thrown");
sock_read_task.abort();
dev_read_task.abort();
break;