Skip to content

Commit

Permalink
fix: Add sleep to wait for firecracker socket
Browse files Browse the repository at this point in the history
  • Loading branch information
sousandrei committed Sep 17, 2022
1 parent 113f0e6 commit e68e14e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/vm/child.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use std::process::Stdio;
use tokio::process::Command;
use tokio::time::{delay_for, Duration};

use crate::error::RuntimeError;
use crate::vm::http;
Expand All @@ -17,6 +18,9 @@ pub async fn spawn_process(
.spawn()
.unwrap();

//TODO: wait for file to appear?
delay_for(Duration::from_millis(10)).await;

set_kernel(vm_name, &state.assets_dir).await?;
println!("kernel");

Expand Down

0 comments on commit e68e14e

Please sign in to comment.