diff --git a/zenoh/src/net/routing/dispatcher/resource.rs b/zenoh/src/net/routing/dispatcher/resource.rs index 1d9e396812..9e9379fbb0 100644 --- a/zenoh/src/net/routing/dispatcher/resource.rs +++ b/zenoh/src/net/routing/dispatcher/resource.rs @@ -285,16 +285,6 @@ impl Resource { }) } - pub fn close(res: &mut Arc) { - let r = get_mut_unchecked(res); - for (_s, c) in &mut r.childs { - Self::close(c); - } - r.parent.take(); - r.childs.clear(); - r.nonwild_prefix.take(); - } - pub fn clean(res: &mut Arc) { let mut resclone = res.clone(); let mutres = get_mut_unchecked(&mut resclone); diff --git a/zenoh/src/net/routing/hat/linkstate_peer/mod.rs b/zenoh/src/net/routing/hat/linkstate_peer/mod.rs index 8aa9c69a39..58f621398a 100644 --- a/zenoh/src/net/routing/hat/linkstate_peer/mod.rs +++ b/zenoh/src/net/routing/hat/linkstate_peer/mod.rs @@ -453,8 +453,6 @@ impl HatBaseTrait for HatCode { } fn close(&self, tables: &mut Tables) { - hat_mut!(tables).peer_qabls.clear(); - hat_mut!(tables).peer_subs.clear(); hat_mut!(tables).peers_net.take(); } } diff --git a/zenoh/src/net/routing/hat/router/mod.rs b/zenoh/src/net/routing/hat/router/mod.rs index 7df245fa45..041ec17913 100644 --- a/zenoh/src/net/routing/hat/router/mod.rs +++ b/zenoh/src/net/routing/hat/router/mod.rs @@ -753,10 +753,6 @@ impl HatBaseTrait for HatCode { } fn close(&self, tables: &mut Tables) { - hat_mut!(tables).peer_qabls.clear(); - hat_mut!(tables).router_qabls.clear(); - hat_mut!(tables).peer_subs.clear(); - hat_mut!(tables).router_subs.clear(); hat_mut!(tables).peers_net.take(); hat_mut!(tables).routers_net.take(); }