Skip to content

Commit

Permalink
Refine the scouting termination (#571)
Browse files Browse the repository at this point in the history
  • Loading branch information
YuanYuYuan authored Nov 13, 2023
1 parent 7b51d04 commit d2399ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/examples/z_scout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ async fn main() {
.await;

// stop scouting
drop(receiver);
receiver.stop();
}
3 changes: 2 additions & 1 deletion zenoh/src/scouting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ impl ScoutInner {
/// # })
/// ```
pub fn stop(self) {
// drop
// This drops the inner `stop_sender` and hence stops the scouting receiver
std::mem::drop(self);
}
}

Expand Down

0 comments on commit d2399ca

Please sign in to comment.