Skip to content

Commit f1318fa

Browse files
committed
fix exec hang when tx channel is full
1 parent 217f0ee commit f1318fa

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

crates/runc-shim/src/service.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ async fn process_exits(
159159
if let Subject::Pid(pid) = e.subject {
160160
debug!("receive exit event: {}", &e);
161161
let exit_code = e.exit_code;
162+
let containers = containers.clone();
163+
let tx = tx.clone();
164+
tokio::spawn(async move {
162165
for (_k, cont) in containers.lock().await.iter_mut() {
163166
let bundle = cont.bundle.to_string();
164167
// pid belongs to container init process
@@ -204,7 +207,7 @@ async fn process_exits(
204207
break;
205208
}
206209
}
207-
}
210+
}});
208211
}
209212
}
210213
monitor_unsubscribe(s.id).await.unwrap_or_default();

0 commit comments

Comments
 (0)