mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-08-21 15:31:15 +00:00
vhost_user_backend: Don't report out socket broken errors
This is a perfectly acceptable situation as it causes the backend to exit because the VMM has closed the connection. This addresses the rather ugly reporting of errors from the backend that appears interleaved with the output from the VMM. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
b5755e9c33
commit
4ebf01b344
@ -174,7 +174,11 @@ impl<S: VhostUserBackend> VhostUserDaemon<S> {
|
|||||||
/// terminate.
|
/// terminate.
|
||||||
pub fn wait(&mut self) -> Result<()> {
|
pub fn wait(&mut self) -> Result<()> {
|
||||||
if let Some(handle) = self.main_thread.take() {
|
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 {
|
} else {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user