modified: src/client.rs
All checks were successful
gitea/Frida-android-native/pipeline/head This commit looks good
All checks were successful
gitea/Frida-android-native/pipeline/head This commit looks good
This commit is contained in:
parent
487f230d59
commit
2cc7c129fe
@ -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 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 dev_read_task = tokio::spawn(async move {
|
||||||
let mut buf = vec![0; 1400]; // mtu
|
let mut buf = vec![0; 1400]; // mtu
|
||||||
loop {
|
loop {
|
||||||
tokio::select! {
|
tokio::select! {
|
||||||
_ = dr_cancel.cancelled() => {
|
_ = dr_cc.cancelled() => {
|
||||||
info!("Cancellation token has been thrown dev_read_task");
|
info!("Cancellation token has been thrown dev_read_task");
|
||||||
return;
|
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 priv_key = BASE64_STANDARD.decode(client_config.client.private_key).unwrap();
|
||||||
|
|
||||||
let cipher_shared_clone = cipher_shared.clone();
|
let cipher_shared_clone = cipher_shared.clone();
|
||||||
|
let sr_cc = sr_cancel.clone();
|
||||||
let sock_read_task = tokio::spawn(async move {
|
let sock_read_task = tokio::spawn(async move {
|
||||||
let mut buf = vec![0; 4096];
|
let mut buf = vec![0; 4096];
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
tokio::select! {
|
tokio::select! {
|
||||||
_ = sr_cancel.cancelled() => {
|
_ = sr_cc.cancelled() => {
|
||||||
info!("Cancellation token has been thrown sock_read_task");
|
info!("Cancellation token has been thrown sock_read_task");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user