Merge pull request #4684 from quanweiZhou/fix-ctr-exit-error

runtime-rs: fix ctr exit failed
This commit is contained in:
Peng Tao
2022-07-19 16:02:20 +08:00
committed by GitHub

View File

@@ -193,7 +193,13 @@ impl ContainerInner {
) -> Result<()> {
let logger = logger_with_process(process);
info!(logger, "begin to stop process");
// do not stop again when state stopped, may cause multi cleanup resource
let state = self.init_process.get_status().await;
if state == ProcessStatus::Stopped {
return Ok(());
}
self.check_state(vec![ProcessStatus::Running])
.await
.context("check state")?;