Skip to content

Commit

Permalink
Implement sending an exit event before breaking out of the thread loop
Browse files Browse the repository at this point in the history
  • Loading branch information
pophilpo committed Oct 27, 2023
1 parent 1db6111 commit 40aa77f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/kubectl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,13 @@ impl Kubectl {
match status.code().unwrap() {
1 => {
// Kill the process if the exit code is 1
out_tx
.send(ChildEvent::Exit(
id,
status,
RestartPolicy::WillRestartIn(RetryDelay::NEVER)
))
.ok();
break 'new_process Err(anyhow!("Command returned status code 1"));
}
_ => {}
Expand Down

0 comments on commit 40aa77f

Please sign in to comment.