zenoh
zenoh copied to clipboard
``PublicationCache is not dropped
Describe the bug
A new session creation hangs if a PublicationCache
of another closed session is not dropped.
To reproduce
use config::ModeDependentValue;
use zenoh_ext::SessionExt;
use zenoh::prelude::r#async::*;
#[tokio::main]
async fn main() {
{
let mut config = config::peer();
config
.timestamping
.set_enabled(Some(ModeDependentValue::Unique(true)))
.unwrap();
println!("Open a zenoh session.");
let session = zenoh::open(config).res().await.unwrap();
println!("Declare a publisher.");
session.declare_publisher("asdfasdfas").res().await.unwrap();
// Comment out this block can pass the test
println!("Declare a publisher cache.");
session
.declare_publication_cache("asdfasdf")
.res()
.await
.unwrap();
println!("Drop the session.");
}
println!("Open a new zenoh session.");
zenoh::open(config::peer()).res().await.unwrap();
println!("Done.");
}
System info
- zenoh: 25f06bd