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
89a12509ed
commit
774fbaee5c
@ -47,10 +47,10 @@ pub async fn client_mode(client_config: ClientConfiguration, fd: i32, close_toke
|
|||||||
let cancel_dr = close_token.clone();
|
let cancel_dr = close_token.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
|
||||||
let listen = listen_dr.clone();
|
|
||||||
loop {
|
loop {
|
||||||
tokio::select! {
|
tokio::select! {
|
||||||
_ = cancel_dr.cancelled() => {
|
_ = cancel_dr.cancelled() => {
|
||||||
|
info!("Cancellation token has been thrown dev_read_task");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
rr = dev_reader.read(&mut buf) => {
|
rr = dev_reader.read(&mut buf) => {
|
||||||
@ -73,6 +73,7 @@ pub async fn client_mode(client_config: ClientConfiguration, fd: i32, close_toke
|
|||||||
loop {
|
loop {
|
||||||
tokio::select! {
|
tokio::select! {
|
||||||
_ = cancel_sr.cancelled() => {
|
_ = cancel_sr.cancelled() => {
|
||||||
|
info!("Cancellation token has been thrown sock_read_task");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
rr = sock_rec.recv(&mut buf) => {
|
rr = sock_rec.recv(&mut buf) => {
|
||||||
@ -135,8 +136,6 @@ pub async fn client_mode(client_config: ClientConfiguration, fd: i32, close_toke
|
|||||||
tokio::select! {
|
tokio::select! {
|
||||||
_ = close_token.cancelled() => {
|
_ = close_token.cancelled() => {
|
||||||
info!("Cancellation token has been thrown");
|
info!("Cancellation token has been thrown");
|
||||||
cancel_sr.send(());
|
|
||||||
cancel_dr.send(());
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
rr = rx.recv() => {
|
rr = rx.recv() => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user