Skip to content

Commit

Permalink
Revert "fix: don't reacquire lock to clear unstable data"
Browse files Browse the repository at this point in the history
This reverts commit 03dd54c.
  • Loading branch information
wyfo committed Nov 6, 2024
1 parent 03dd54c commit 3961ff4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions zenoh/src/api/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1101,14 +1101,14 @@ impl SessionInner {
let _liveliness_subscribers = std::mem::take(&mut state.liveliness_subscribers);
let _local_resources = std::mem::take(&mut state.local_resources);
let _remote_resources = std::mem::take(&mut state.remote_resources);
let _tokens: HashMap<Id, Arc<LivelinessTokenState>>;
let _matching_listeners: HashMap<Id, Arc<MatchingListenerState>>;
drop(state);
#[cfg(feature = "unstable")]
{
_tokens = std::mem::take(&mut state.tokens);
_matching_listeners = std::mem::take(&mut state.matching_listeners);
let mut state = zwrite!(self.state);
let _tokens = std::mem::take(&mut state.tokens);
let _matching_listeners = std::mem::take(&mut state.matching_listeners);
drop(state);
}
drop(state);
Ok(())
})
}
Expand Down

0 comments on commit 3961ff4

Please sign in to comment.