From ec0c1b01c4617c242944bcf6f55fdfb28bb9dbc6 Mon Sep 17 00:00:00 2001 From: LiHui Date: Fri, 29 Apr 2022 16:50:38 +0800 Subject: [PATCH] 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 Signed-off-by: Rob Bradford --- vmm/src/api/http.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/vmm/src/api/http.rs b/vmm/src/api/http.rs index 04998c28f..6a643d2d0 100644 --- a/vmm/src/api/http.rs +++ b/vmm/src/api/http.rs @@ -255,7 +255,6 @@ pub fn start_http_path_thread( seccomp_action: &SeccompAction, exit_evt: EventFd, ) -> Result>> { - std::fs::remove_file(path).unwrap_or_default(); let socket_path = PathBuf::from(path); let socket_fd = UnixListener::bind(socket_path).map_err(VmmError::CreateApiServerSocket)?; let server =