diff --git a/Cargo.lock b/Cargo.lock index b55b906..25a4604 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1360,7 +1360,7 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "shvcall" -version = "3.9.11" +version = "3.9.12" dependencies = [ "async-channel 2.5.0", "clap", diff --git a/Cargo.toml b/Cargo.toml index a60e40a..cecaaeb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "shvcall" description = "CLI utility to invoke remote SHV RPC calls" license = "MIT" repository = "https://github.com/silicon-heaven/shvcall-rs" -version = "3.9.11" +version = "3.9.12" edition = "2024" [[bin]] diff --git a/src/lib.rs b/src/lib.rs index 6c807c8..64c8271 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -671,15 +671,9 @@ async fn start_tunnel_server( break; } } - tunnels.retain(|tunnel| tunnel.frame_sender.is_closed()); - // { - // if tunnel.frame_sender.is_closed() { - // debug!(target: "Tunnel", "Removing closed tunnel state {:?}", tunnel); - // false - // } else { - // true - // } - // }); + tunnels.extract_if(.., |tunnel| tunnel.frame_sender.is_closed()).for_each(|tunnel| { + debug!(target: "Tunnel", "Removing closed tunnel {:?}", tunnel); + }); } Err(e) => { error!("Get response receiver error: {e}");