diff --git a/zenoh/src/net/routing/hat/client/mod.rs b/zenoh/src/net/routing/hat/client/mod.rs index 54d3d92f27..1324a18632 100644 --- a/zenoh/src/net/routing/hat/client/mod.rs +++ b/zenoh/src/net/routing/hat/client/mod.rs @@ -119,6 +119,11 @@ impl HatBaseTrait for HatCode { fn close_face(&self, tables: &TablesLock, face: &mut Arc) { let mut wtables = zwrite!(tables.tables); let mut face_clone = face.clone(); + + face_hat_mut!(face).remote_sub_interests.clear(); + face_hat_mut!(face).local_subs.clear(); + face_hat_mut!(face).local_qabls.clear(); + let face = get_mut_unchecked(face); for res in face.remote_mappings.values_mut() { get_mut_unchecked(res).session_ctxs.remove(&face.id); diff --git a/zenoh/src/net/routing/hat/linkstate_peer/mod.rs b/zenoh/src/net/routing/hat/linkstate_peer/mod.rs index f6a0c34218..ff90c762f9 100644 --- a/zenoh/src/net/routing/hat/linkstate_peer/mod.rs +++ b/zenoh/src/net/routing/hat/linkstate_peer/mod.rs @@ -251,6 +251,12 @@ impl HatBaseTrait for HatCode { fn close_face(&self, tables: &TablesLock, face: &mut Arc) { let mut wtables = zwrite!(tables.tables); let mut face_clone = face.clone(); + + face_hat_mut!(face).remote_sub_interests.clear(); + face_hat_mut!(face).local_subs.clear(); + face_hat_mut!(face).remote_qabl_interests.clear(); + face_hat_mut!(face).local_qabls.clear(); + let face = get_mut_unchecked(face); for res in face.remote_mappings.values_mut() { get_mut_unchecked(res).session_ctxs.remove(&face.id); diff --git a/zenoh/src/net/routing/hat/p2p_peer/mod.rs b/zenoh/src/net/routing/hat/p2p_peer/mod.rs index f56ac3f1af..a66695e941 100644 --- a/zenoh/src/net/routing/hat/p2p_peer/mod.rs +++ b/zenoh/src/net/routing/hat/p2p_peer/mod.rs @@ -191,6 +191,12 @@ impl HatBaseTrait for HatCode { fn close_face(&self, tables: &TablesLock, face: &mut Arc) { let mut wtables = zwrite!(tables.tables); let mut face_clone = face.clone(); + + face_hat_mut!(face).remote_sub_interests.clear(); + face_hat_mut!(face).local_subs.clear(); + face_hat_mut!(face).remote_qabl_interests.clear(); + face_hat_mut!(face).local_qabls.clear(); + let face = get_mut_unchecked(face); for res in face.remote_mappings.values_mut() { get_mut_unchecked(res).session_ctxs.remove(&face.id); diff --git a/zenoh/src/net/routing/hat/router/mod.rs b/zenoh/src/net/routing/hat/router/mod.rs index 1ac1cdbc2f..bc7a4c8b1e 100644 --- a/zenoh/src/net/routing/hat/router/mod.rs +++ b/zenoh/src/net/routing/hat/router/mod.rs @@ -424,6 +424,12 @@ impl HatBaseTrait for HatCode { fn close_face(&self, tables: &TablesLock, face: &mut Arc) { let mut wtables = zwrite!(tables.tables); let mut face_clone = face.clone(); + + face_hat_mut!(face).remote_sub_interests.clear(); + face_hat_mut!(face).local_subs.clear(); + face_hat_mut!(face).remote_qabl_interests.clear(); + face_hat_mut!(face).local_qabls.clear(); + let face = get_mut_unchecked(face); for res in face.remote_mappings.values_mut() { get_mut_unchecked(res).session_ctxs.remove(&face.id);