Skip to content

Commit

Permalink
fix(core): exit with no success should not be a error
Browse files Browse the repository at this point in the history
  • Loading branch information
greenhat616 committed Jul 21, 2024
1 parent 8e11918 commit 0af5a13
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions nyanpasu-utils/src/core/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,14 +270,10 @@ impl CoreInstance {
instance.kill()?;
loop {
if let Some(state) = instance.try_wait()? {
if state.success() {
break;
} else {
return Err(CoreInstanceError::Io(std::io::Error::new(
std::io::ErrorKind::Other,
format!("Failed to kill instance: {:?}", state),
)));
if !state.success() {
tracing::warn!("instance terminated with error: {:?}", state);
}
break;
}
std::thread::sleep(std::time::Duration::from_millis(10));
}
Expand Down

0 comments on commit 0af5a13

Please sign in to comment.