mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-22 03:12:27 +00:00
vhost_user_backend: Forward the error from main thread
The main thread returns a Result with any errors from it. Although the error from the join itself was being returned the real error from the thread was being ignored so ensure that it is forwarded. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
80c9dc2e0c
commit
f1e19d6c96
@ -153,9 +153,10 @@ impl<S: VhostUserBackend> VhostUserDaemon<S> {
|
||||
/// 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user