diff --git a/vhost_user_backend/src/lib.rs b/vhost_user_backend/src/lib.rs index 8a266ddaf..fb8c7dc7e 100644 --- a/vhost_user_backend/src/lib.rs +++ b/vhost_user_backend/src/lib.rs @@ -153,9 +153,10 @@ impl VhostUserDaemon { /// terminate. pub fn wait(&mut self) -> Result<()> { if let Some(handle) = self.main_thread.take() { - let _ = handle.join().map_err(Error::WaitDaemon)?; + handle.join().map_err(Error::WaitDaemon)? + } else { + Ok(()) } - Ok(()) } /// Retrieve the vring worker. This is necessary to perform further