Skip to content

Commit

Permalink
Queryables/Subscribers/tokens declaration order (#588) (#589)
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierHecart authored Nov 28, 2023
1 parent bbd12e2 commit 8904d16
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions zenoh/src/net/routing/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,8 @@ impl Tables {
.clone();
log::debug!("New {}", newface);

pubsub_new_face(self, &mut newface);
queries_new_face(self, &mut newface);
pubsub_new_face(self, &mut newface);

Arc::downgrade(&newface)
}
Expand Down Expand Up @@ -316,8 +316,8 @@ impl Tables {
.clone();
log::debug!("New {}", newface);

pubsub_new_face(self, &mut newface);
queries_new_face(self, &mut newface);
pubsub_new_face(self, &mut newface);

Arc::downgrade(&newface)
}
Expand Down Expand Up @@ -362,8 +362,8 @@ impl Tables {
};

log::trace!("Compute routes");
pubsub_tree_change(&mut tables, &new_childs, net_type);
queries_tree_change(&mut tables, &new_childs, net_type);
pubsub_tree_change(&mut tables, &new_childs, net_type);

log::trace!("Computations completed");
match net_type {
Expand Down Expand Up @@ -740,12 +740,12 @@ impl TransportPeerEventHandler for LinkStateInterceptor {
.link_states(list.link_states, zid)
.removed_nodes
{
pubsub_remove_node(
queries_remove_node(
&mut tables,
&removed_node.zid,
WhatAmI::Router,
);
queries_remove_node(
pubsub_remove_node(
&mut tables,
&removed_node.zid,
WhatAmI::Router,
Expand Down Expand Up @@ -796,12 +796,12 @@ impl TransportPeerEventHandler for LinkStateInterceptor {
);
} else {
for (_, updated_node) in changes.updated_nodes {
pubsub_linkstate_change(
queries_linkstate_change(
&mut tables,
&updated_node.zid,
&updated_node.links,
);
queries_linkstate_change(
pubsub_linkstate_change(
&mut tables,
&updated_node.zid,
&updated_node.links,
Expand Down Expand Up @@ -840,8 +840,8 @@ impl TransportPeerEventHandler for LinkStateInterceptor {
for (_, removed_node) in
tables.routers_net.as_mut().unwrap().remove_link(&zid)
{
pubsub_remove_node(&mut tables, &removed_node.zid, WhatAmI::Router);
queries_remove_node(&mut tables, &removed_node.zid, WhatAmI::Router);
pubsub_remove_node(&mut tables, &removed_node.zid, WhatAmI::Router);
}

if tables.full_net(WhatAmI::Peer) {
Expand All @@ -860,8 +860,8 @@ impl TransportPeerEventHandler for LinkStateInterceptor {
for (_, removed_node) in
tables.peers_net.as_mut().unwrap().remove_link(&zid)
{
pubsub_remove_node(&mut tables, &removed_node.zid, WhatAmI::Peer);
queries_remove_node(&mut tables, &removed_node.zid, WhatAmI::Peer);
pubsub_remove_node(&mut tables, &removed_node.zid, WhatAmI::Peer);
}

if tables.whatami == WhatAmI::Router {
Expand Down

0 comments on commit 8904d16

Please sign in to comment.