mirror of
https://github.com/zyycn/codex-proxy-rs.git
synced 2026-11-06 16:06:08 +00:00
style: apply rustfmt to host shutdown changes
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -116,7 +116,10 @@ impl WorkerSupervisor {
|
||||
let handles = std::mem::take(&mut *lock_unpoisoned(&self.handles));
|
||||
let deadline = tokio::time::Instant::now() + timeout;
|
||||
for (_, mut handle) in handles {
|
||||
if tokio::time::timeout_at(deadline, &mut handle).await.is_err() {
|
||||
if tokio::time::timeout_at(deadline, &mut handle)
|
||||
.await
|
||||
.is_err()
|
||||
{
|
||||
handle.abort();
|
||||
let _ = handle.await;
|
||||
}
|
||||
|
||||
@@ -660,7 +660,9 @@ async fn shutdown_timeout_must_not_rejoin_workers_that_already_exited() {
|
||||
});
|
||||
let leases = Arc::new(FakeLeasePort::default());
|
||||
let supervisor = supervisor();
|
||||
supervisor.start(plan, leases.clone()).expect("complete plan");
|
||||
supervisor
|
||||
.start(plan, leases.clone())
|
||||
.expect("complete plan");
|
||||
hung.notification.notified().await;
|
||||
wait_until(|| cooperative.entered.load(Ordering::SeqCst) == ACTIVE_KINDS.len() - 1).await;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user