mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-30 12:44:39 +00:00
sandbox: Remove unnecessary thread
Don't create a thread to wait for the ttRPC server to end - it isn't required as the operation should be blocked on. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
parent
d5fbba3b0a
commit
572de288f0
@ -246,17 +246,9 @@ fn start_sandbox(logger: &Logger, config: &agentConfig) -> Result<()> {
|
||||
//vsock:///dev/vsock, port
|
||||
let mut server = rpc::start(sandbox.clone(), VSOCK_ADDR, VSOCK_PORT);
|
||||
|
||||
let handle = thread::spawn(move || {
|
||||
// info!("Press ENTER to exit...");
|
||||
// let _ = io::stdin().read(&mut [0]).unwrap();
|
||||
// thread::sleep(Duration::from_secs(3000));
|
||||
|
||||
let _ = rx.recv().unwrap();
|
||||
});
|
||||
|
||||
let _ = server.start().unwrap();
|
||||
|
||||
handle.join().unwrap();
|
||||
let _ = rx.recv().map_err(|e| format!("{:?}", e));
|
||||
|
||||
server.shutdown();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user