Skip to content

Commit

Permalink
fix: insert deadlock spacejam#1380
Browse files Browse the repository at this point in the history
  • Loading branch information
uuhan committed Oct 13, 2021
1 parent c840fe7 commit 34fb986
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,19 @@ impl Tree {
let last_value = last_value.map(IVec::from);

if value == last_value {
// NB: always broadcast event
if let Some(Some(res)) = subscriber_reservation.take() {
let event = subscriber::Event::single_update(
self.clone(),
key.as_ref().into(),
value,
);

res.complete(&event);
}

// short-circuit a no-op set or delete
return Ok(Ok(value));
return Ok(Ok(last_value));
}

let frag = if let Some(value) = value.clone() {
Expand Down

0 comments on commit 34fb986

Please sign in to comment.