From 500a070c6504514e0ebdcaa29265dd0ba80a3a36 Mon Sep 17 00:00:00 2001 From: Nicholas Barbier Date: Sun, 9 Nov 2025 13:10:40 -0500 Subject: [PATCH] Fix shutdown sleeping twice for graceful timeout The shutdown_timeout call already waits up to the timeout duration. The additional sleep causes shutdown to always wait for the full timeout period even when runtimes exit early. Fixes #727 --- pingora-core/src/server/mod.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/pingora-core/src/server/mod.rs b/pingora-core/src/server/mod.rs index b750c7b2..2a43aae9 100644 --- a/pingora-core/src/server/mod.rs +++ b/pingora-core/src/server/mod.rs @@ -578,7 +578,6 @@ impl Server { info!("Waiting for runtimes to exit!"); let join = thread::spawn(move || { rt.shutdown_timeout(shutdown_timeout); - thread::sleep(shutdown_timeout) }); (join, name) })