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 23:05:14 +03:00
parent 487f230d59
commit 2cc7c129fe

View File

@ -47,11 +47,12 @@ pub async fn client_mode(client_config: ClientConfiguration, fd: i32, close_toke
let cipher_shared: Arc<Mutex<Option<x25519_dalek::SharedSecret>>> = Arc::new(Mutex::new(None));
let dr_cc = dr_cancel.clone();
let dev_read_task = tokio::spawn(async move {
let mut buf = vec![0; 1400]; // mtu
loop {
tokio::select! {
_ = dr_cancel.cancelled() => {
_ = dr_cc.cancelled() => {
info!("Cancellation token has been thrown dev_read_task");
return;
}
@ -68,12 +69,13 @@ pub async fn client_mode(client_config: ClientConfiguration, fd: i32, close_toke
let priv_key = BASE64_STANDARD.decode(client_config.client.private_key).unwrap();
let cipher_shared_clone = cipher_shared.clone();
let sr_cc = sr_cancel.clone();
let sock_read_task = tokio::spawn(async move {
let mut buf = vec![0; 4096];
loop {
tokio::select! {
_ = sr_cancel.cancelled() => {
_ = sr_cc.cancelled() => {
info!("Cancellation token has been thrown sock_read_task");
return;
}