Skip to content

Commit

Permalink
- remove no longer needed manual resource cleaning code for hats
Browse files Browse the repository at this point in the history
- removed no longer needed Resource::close method
  • Loading branch information
DenisBiryukov91 committed Feb 9, 2024
1 parent 921365a commit a4111cc
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 16 deletions.
10 changes: 0 additions & 10 deletions zenoh/src/net/routing/dispatcher/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,16 +285,6 @@ impl Resource {
})
}

pub fn close(res: &mut Arc<Resource>) {
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<Resource>) {
let mut resclone = res.clone();
let mutres = get_mut_unchecked(&mut resclone);
Expand Down
2 changes: 0 additions & 2 deletions zenoh/src/net/routing/hat/linkstate_peer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand Down
4 changes: 0 additions & 4 deletions zenoh/src/net/routing/hat/router/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit a4111cc

Please sign in to comment.