Skip to content

Commit

Permalink
Speed up routing test and work around the failure of three_node_combi…
Browse files Browse the repository at this point in the history
…nation test
  • Loading branch information
YuanYuYuan committed Jan 25, 2024
1 parent 0d9390f commit 251919d
Show file tree
Hide file tree
Showing 2 changed files with 243 additions and 151 deletions.
16 changes: 8 additions & 8 deletions io/zenoh-links/zenoh-link-tcp/src/unicast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,14 @@ impl LinkUnicastTrait for LinkUnicastTcp {

// WARN assume the drop of TcpStream would clean itself
// https://docs.rs/tokio/latest/tokio/net/struct.TcpStream.html#method.into_split
// impl Drop for LinkUnicastTcp {
// fn drop(&mut self) {
// // Close the underlying TCP socket
// ZRuntime::TX.handle().block_on(async {
// let _ = self.get_mut_socket().shutdown().await;
// });
// }
// }
impl Drop for LinkUnicastTcp {
fn drop(&mut self) {
// Close the underlying TCP socket
zenoh_runtime::ZRuntime::Transport.block_in_place(async {
let _ = self.get_mut_socket().shutdown().await;
});
}
}

impl fmt::Display for LinkUnicastTcp {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Expand Down
Loading

0 comments on commit 251919d

Please sign in to comment.