krata: fix guest destruction

This commit is contained in:
Alex Zenla
2024-03-30 03:49:13 +00:00
parent d659b3aa55
commit da9e6cac14
12 changed files with 103 additions and 122 deletions

View File

@ -153,7 +153,7 @@ impl NetworkBackend {
pub async fn launch(self) -> Result<JoinHandle<()>> {
Ok(tokio::task::spawn(async move {
info!(
"lauched network backend for krata guest {}",
"launched network backend for krata guest {}",
self.metadata.uuid
);
if let Err(error) = self.run().await {

View File

@ -291,6 +291,12 @@ impl AsyncRawSocketChannel {
debug!("failed to transmit: would block");
continue;
}
// device no longer exists
if error.raw_os_error() == Some(6) {
break;
}
return Err(anyhow!(
"failed to write {} bytes to raw socket: {}",
packet.len(),