mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
virtio-devices: vhost-user: Log when attempting reconnection
Currently when the socket is disconnected by the other end there is no logging of such an event. Add a log to aid identifying when this has happened. Signed-off-by: Rob Bradford <rbradford@meta.com>
This commit is contained in:
@@ -9,7 +9,7 @@ use std::{io, thread};
|
||||
|
||||
use anyhow::anyhow;
|
||||
use event_monitor::event;
|
||||
use log::error;
|
||||
use log::{error, info};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use thiserror::Error;
|
||||
use vhost::Error as VhostError;
|
||||
@@ -303,6 +303,10 @@ impl<S: VhostUserFrontendReqHandler> EpollHelperHandler for VhostUserEpollHandle
|
||||
let ev_type = event.data as u16;
|
||||
match ev_type {
|
||||
HUP_CONNECTION_EVENT => {
|
||||
info!(
|
||||
"vhost-user backend for socket {} disconnected, attempting reconnection",
|
||||
self.socket_path
|
||||
);
|
||||
self.reconnect(helper).map_err(|e| {
|
||||
EpollHelperError::HandleEvent(anyhow!(
|
||||
"failed to reconnect vhost-user backend for socket {}: {e:?}",
|
||||
|
||||
Reference in New Issue
Block a user