Skip to content

Commit

Permalink
Clone callback and release lock
Browse files Browse the repository at this point in the history
  • Loading branch information
Mallets committed Dec 19, 2024
1 parent 10b7361 commit 4bbbaa2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion io/zenoh-transport/src/unicast/universal/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ impl TransportUnicastUniversal {
};

// Notify the callback
if let Some(callback) = zread!(self.callback).as_ref() {
let cb = zread!(self.callback).clone();
if let Some(callback) = cb {
callback.del_link(link);
}

Expand Down

0 comments on commit 4bbbaa2

Please sign in to comment.