krata: fix guest destruction

This commit is contained in:
alex committed 2024-03-30 03:49:13 +00:00
1 parent d659b3aa55
commit da9e6cac14
12 files changed
+103 -122

No files matched your search

+1 -1
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 {
+6
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(),