From 64de9279e39cbdce07b97b4ded1ea439ff7192e8 Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Mon, 13 Jul 2026 04:08:23 +0300 Subject: [PATCH] fix: allow slow server shutdowns --- src/session.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/session.rs b/src/session.rs index 8abda3d1..09657fa0 100644 --- a/src/session.rs +++ b/src/session.rs @@ -11,7 +11,7 @@ pub const SESSION_ENV_VAR: &str = "HERDR_SESSION"; pub const DEFAULT_SESSION_NAME: &str = "default"; const MAX_SESSION_NAME_LEN: usize = 64; -const STOP_WAIT_TIMEOUT: Duration = Duration::from_secs(2); +const STOP_WAIT_TIMEOUT: Duration = Duration::from_secs(15); const STOP_WAIT_POLL: Duration = Duration::from_millis(25); const MIN_SOCKET_TIMEOUT: Duration = Duration::from_millis(1); @@ -494,6 +494,11 @@ mod tests { (client, server, path) } + #[test] + fn stop_wait_timeout_allows_slow_graceful_shutdown() { + assert_eq!(STOP_WAIT_TIMEOUT, Duration::from_secs(15)); + } + #[test] fn stop_request_errors_wait_for_socket_state() { for kind in [