Merge pull request #9598 from lifupan/main_shim

runtime-rs: fix the issue of the leak of dead shim
This commit is contained in:
GabyCT
2024-05-07 10:14:11 -06:00
committed by GitHub

View File

@@ -128,13 +128,16 @@ impl RuntimeHandlerManagerInner {
} }
} }
let instance = Arc::new(runtime_instance);
self.runtime_instance = Some(instance.clone());
// start sandbox // start sandbox
runtime_instance instance
.sandbox .sandbox
.start(dns, spec, state, network_env) .start(dns, spec, state, network_env)
.await .await
.context("start sandbox")?; .context("start sandbox")?;
self.runtime_instance = Some(Arc::new(runtime_instance));
Ok(()) Ok(())
} }