diff --git a/src/lib.rs b/src/lib.rs index 0e94da5..6256e06 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -174,7 +174,11 @@ impl VhostUserDaemon { /// terminate. pub fn wait(&mut self) -> Result<()> { if let Some(handle) = self.main_thread.take() { - handle.join().map_err(Error::WaitDaemon)? + match handle.join().map_err(Error::WaitDaemon)? { + Ok(()) => Ok(()), + Err(Error::HandleRequest(VhostUserError::SocketBroken(_))) => Ok(()), + Err(e) => Err(e), + } } else { Ok(()) }