diff --git a/src/unix_socket.rs b/src/unix_socket.rs index fe736479..7dae3432 100644 --- a/src/unix_socket.rs +++ b/src/unix_socket.rs @@ -50,7 +50,7 @@ impl Stream for UnixListenerStream { pub async fn run_server(socket_path: &Path) -> Result { info!("Starting Unix socket server listening cnx on {:?}", socket_path); - let path_to_delete = socket_path.exists(); + let path_to_delete = !socket_path.exists(); let listener = UnixListener::bind(socket_path) .with_context(|| format!("Cannot create Unix socket server {:?}", socket_path))?;