mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-03 20:15:45 +00:00
Revert "vhost-user-backend: Correct error handling in run"
This reverts commit 4a1af7f63c
.
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…
Reference in New Issue
Block a user