From c36de8a12f001e47d098ae0c5ec2fabfbcd818aa Mon Sep 17 00:00:00 2001 From: Bugen Zhao Date: Wed, 24 Jul 2024 18:11:12 +0800 Subject: [PATCH] fix it Signed-off-by: Bugen Zhao --- src/utils/runtime/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/runtime/src/lib.rs b/src/utils/runtime/src/lib.rs index d199c2709402f..75a4a5f4d00b1 100644 --- a/src/utils/runtime/src/lib.rs +++ b/src/utils/runtime/src/lib.rs @@ -97,13 +97,13 @@ where spawn_prof_thread(profile_path); } - let mut sigint = tokio::signal::unix::signal(SignalKind::interrupt()).unwrap(); - let mut sigterm = tokio::signal::unix::signal(SignalKind::terminate()).unwrap(); - let future_with_shutdown = async move { let shutdown = CancellationToken::new(); let mut fut = pin!(f(shutdown.clone())); + let mut sigint = tokio::signal::unix::signal(SignalKind::interrupt()).unwrap(); + let mut sigterm = tokio::signal::unix::signal(SignalKind::terminate()).unwrap(); + tokio::select! { biased;