diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-13 04:08:23 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-13 04:08:23 +0300 |
| commit | 64de9279e39cbdce07b97b4ded1ea439ff7192e8 (patch) | |
| tree | 3cb5f5d762a940eaf67d9d97a7fb04ae124cc2d2 | |
| parent | 4800ff54f0a85019d589211f42aafe476a7fd45d (diff) | |
fix: allow slow server shutdowns
| -rw-r--r-- | src/session.rs | 7 |
1 files changed, 6 insertions, 1 deletions
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); @@ -495,6 +495,11 @@ mod tests { } #[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 [ std::io::ErrorKind::BrokenPipe, |
