mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-01 17:35:19 +00:00
Revert "vhost-user-backend: Correct error handling in run"
This reverts commit 4a1af7f63c755c54db30b9cc47b2cb86608899ff. This change erroneously ignored the return value for the result which meant that requests to break out of the loop due to a kill event were lost. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
c706ca1522
commit
80c9dc2e0c
@ -262,6 +262,8 @@ impl<S: VhostUserBackend> VringEpollHandler<S> {
|
||||
enum VringWorkerError {
|
||||
/// Failed while waiting for events.
|
||||
EpollWait(io::Error),
|
||||
/// Failed to handle the event.
|
||||
HandleEvent(VringEpollHandlerError),
|
||||
}
|
||||
|
||||
/// Result of vring worker operations.
|
||||
@ -306,11 +308,10 @@ impl VringWorker {
|
||||
|
||||
let ev_type = event.data as u16;
|
||||
|
||||
if let Err(e) = handler.handle_event(ev_type, evset) {
|
||||
println!(
|
||||
"vring handler handle event {} with error {:?}\n",
|
||||
ev_type, e
|
||||
);
|
||||
if handler
|
||||
.handle_event(ev_type, evset)
|
||||
.map_err(VringWorkerError::HandleEvent)?
|
||||
{
|
||||
break 'epoll;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user