Skip to content

Commit 12a89ae

Browse files
committed
Reset target_state on Started event
1 parent 2686709 commit 12a89ae

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/app.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -947,6 +947,15 @@ impl App {
947947
if let Some(proc) = self.state.get_proc_mut(proc_id) {
948948
proc.is_up = true;
949949
proc.last_start = Some(Instant::now());
950+
match proc.target_state {
951+
TargetState::None => (),
952+
TargetState::Started => {
953+
proc.target_state = TargetState::None;
954+
}
955+
TargetState::Stopped => {
956+
self.pc.send(KernelCommand::ProcCmd(proc_id, ProcCmd::Stop));
957+
}
958+
}
950959
loop_action.render();
951960
}
952961
}

0 commit comments

Comments
 (0)