Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierHecart committed Sep 9, 2024
1 parent 70a7ae7 commit a6c4664
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions zenoh/src/net/routing/hat/p2p_peer/interests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ use zenoh_protocol::{
use zenoh_sync::get_mut_unchecked;

use super::{
face_hat, face_hat_mut, pubsub::declare_sub_interest, queries::declare_qabl_interest,
token::declare_token_interest, HatCode, HatFace,
face_hat, face_hat_mut, initial_interest, pubsub::declare_sub_interest,
queries::declare_qabl_interest, token::declare_token_interest, HatCode, HatFace,
};
use crate::net::routing::{
dispatcher::{
Expand Down Expand Up @@ -136,11 +136,7 @@ impl HatInterestTrait for HatCode {
f.whatami == WhatAmI::Router
|| (options.tokens()
&& f.whatami == WhatAmI::Peer
&& !f
.local_interests
.get(&0)
.map(|i| i.finalized)
.unwrap_or(true))
&& !initial_interest(f).map(|i| i.finalized).unwrap_or(true))
}) {
let id = face_hat!(dst_face).next_id.fetch_add(1, Ordering::SeqCst);
get_mut_unchecked(dst_face).local_interests.insert(
Expand Down

0 comments on commit a6c4664

Please sign in to comment.