Skip to content

Commit e68e14e

Browse files
committed
fix: Add sleep to wait for firecracker socket
1 parent 113f0e6 commit e68e14e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/vm/child.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use std::process::Stdio;
22
use tokio::process::Command;
3+
use tokio::time::{delay_for, Duration};
34

45
use crate::error::RuntimeError;
56
use crate::vm::http;
@@ -17,6 +18,9 @@ pub async fn spawn_process(
1718
.spawn()
1819
.unwrap();
1920

21+
//TODO: wait for file to appear?
22+
delay_for(Duration::from_millis(10)).await;
23+
2024
set_kernel(vm_name, &state.assets_dir).await?;
2125
println!("kernel");
2226

0 commit comments

Comments
 (0)