mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-18 18:45:19 +00:00
vmm: api: Do not delete the API socket on API server creation
The socket will safely deleted on shutdown and so it is not necessary to delete the API socket when starting the HTTP server. Fixes: #4026 Signed-off-by: LiHui <andrewli@kubesphere.io> Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
f77ea5a2ce
commit
ec0c1b01c4
@ -255,7 +255,6 @@ pub fn start_http_path_thread(
|
|||||||
seccomp_action: &SeccompAction,
|
seccomp_action: &SeccompAction,
|
||||||
exit_evt: EventFd,
|
exit_evt: EventFd,
|
||||||
) -> Result<thread::JoinHandle<Result<()>>> {
|
) -> Result<thread::JoinHandle<Result<()>>> {
|
||||||
std::fs::remove_file(path).unwrap_or_default();
|
|
||||||
let socket_path = PathBuf::from(path);
|
let socket_path = PathBuf::from(path);
|
||||||
let socket_fd = UnixListener::bind(socket_path).map_err(VmmError::CreateApiServerSocket)?;
|
let socket_fd = UnixListener::bind(socket_path).map_err(VmmError::CreateApiServerSocket)?;
|
||||||
let server =
|
let server =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user