Skip to content

Commit

Permalink
fix exec hang when tx channel is full
Browse files Browse the repository at this point in the history
  • Loading branch information
ningmingxiao committed Sep 27, 2024
1 parent 217f0ee commit f1318fa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/runc-shim/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ async fn process_exits(
if let Subject::Pid(pid) = e.subject {
debug!("receive exit event: {}", &e);
let exit_code = e.exit_code;
let containers = containers.clone();
let tx = tx.clone();
tokio::spawn(async move {
for (_k, cont) in containers.lock().await.iter_mut() {
let bundle = cont.bundle.to_string();
// pid belongs to container init process
Expand Down Expand Up @@ -204,7 +207,7 @@ async fn process_exits(
break;
}
}
}
}});
}
}
monitor_unsubscribe(s.id).await.unwrap_or_default();
Expand Down

0 comments on commit f1318fa

Please sign in to comment.