Skip to content

Commit

Permalink
fix(core/supervisor): remove faulty optimization leading to deadlock
Browse files Browse the repository at this point in the history
  • Loading branch information
GoldsteinE committed Aug 10, 2023
1 parent 9c41531 commit fe79949
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions elfo-core/src/supervisor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,13 +251,8 @@ where
return visitor.empty(envelope);
}

loop {
let object = iter.next().unwrap();
if iter.peek().is_none() {
return visitor.visit_last(&object, envelope);
} else {
visitor.visit(&object, &envelope);
}
while let Some(object) = iter.next() {
visitor.visit(&object, &envelope);
}
}

Expand Down

0 comments on commit fe79949

Please sign in to comment.