mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: Fix map_err losing the inner error
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
@@ -109,7 +109,7 @@ pub enum Error {
|
||||
VcpuUnhandledKvmExit,
|
||||
|
||||
/// Failed to join on vCPU threads
|
||||
ThreadCleanup,
|
||||
ThreadCleanup(std::boxed::Box<dyn std::any::Any + std::marker::Send>),
|
||||
|
||||
/// Cannot add legacy device to Bus.
|
||||
BusError(devices::BusError),
|
||||
@@ -478,7 +478,7 @@ impl VcpuState {
|
||||
|
||||
fn join_thread(&mut self) -> Result<()> {
|
||||
if let Some(handle) = self.handle.take() {
|
||||
handle.join().map_err(|_| Error::ThreadCleanup)?
|
||||
handle.join().map_err(Error::ThreadCleanup)?
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user