Skip to content

Commit

Permalink
fix: make publisher lock safer (#1116)
Browse files Browse the repository at this point in the history
  • Loading branch information
wyfo authored Jun 11, 2024
1 parent 13ed78e commit bca5c4d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion zenoh/src/api/publisher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,8 @@ impl<'a> Publisher<'a> {
}

fn undeclare_matching_listeners(&self) -> ZResult<()> {
for id in zlock!(self.matching_listeners).drain() {
let ids: Vec<Id> = zlock!(self.matching_listeners).drain().collect();
for id in ids {
self.session.undeclare_matches_listener_inner(id)?
}
Ok(())
Expand Down

0 comments on commit bca5c4d

Please sign in to comment.