From 6867614526ac05c6dc6851561f3eca4a4bef3123 Mon Sep 17 00:00:00 2001 From: Ping Zhao Date: Wed, 29 Oct 2025 17:05:06 +0800 Subject: [PATCH] fix: scheduler shutdown not guarded Fixes #2012 --- src/bin/nativelink.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/nativelink.rs b/src/bin/nativelink.rs index d90248f35..99766775c 100644 --- a/src/bin/nativelink.rs +++ b/src/bin/nativelink.rs @@ -688,8 +688,8 @@ async fn inner_main( // Set up a shutdown handler for the worker schedulers. let mut shutdown_rx = shutdown_tx.subscribe(); root_futures.push(Box::pin(async move { - let _ = scheduler_shutdown_tx.send(()); if let Ok(shutdown_guard) = shutdown_rx.recv().await { + let _ = scheduler_shutdown_tx.send(()); for (_name, scheduler) in worker_schedulers { scheduler.shutdown(shutdown_guard.clone()).await; }