Skip to content

Commit

Permalink
Crash counter increased only when worker fails
Browse files Browse the repository at this point in the history
  • Loading branch information
spirali committed Sep 20, 2024
1 parent 78b1f59 commit 437e276
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/tako/src/internal/server/reactor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pub(crate) fn on_remove_worker(
task.set_fresh_flag(true);
ready_to_assign.push(task_id);
if task.is_sn_running() {
if task.increment_crash_counter() {
if reason.is_failure() && task.increment_crash_counter() {
crashed_tasks.push(task_id);
} else {
running_tasks.push(task_id);
Expand Down

0 comments on commit 437e276

Please sign in to comment.