Skip to content

Commit 87b953b

Browse files
committed
reduced grace period for soft shutdown to 5 seconds (from 90 seconds)
1 parent d3190e9 commit 87b953b

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

bin/oe/run.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -716,15 +716,13 @@ impl RunningClient {
716716
std::thread::Builder::new()
717717
.name("diamond-node-force-quit".to_string())
718718
.spawn(move || {
719+
720+
let duration_soft = 5;
719721
// we make a force quit if after 90 seconds, if this shutdown routine
720-
std::thread::sleep(Duration::from_secs(30));
721-
warn!(target: "shutdown", "shutdown not happened within 30 seconds, waiting for 60 seconds before force exiting the process.");
722-
std::thread::sleep(Duration::from_secs(50));
723-
warn!(target: "shutdown", "force exit in 10 seconds.");
724-
std::thread::sleep(Duration::from_secs(10));
725-
warn!(target: "shutdown", "force exiting now.");
722+
std::thread::sleep(Duration::from_secs(duration_soft));
723+
warn!(target: "shutdown", "shutdown not happened within {duration_soft} seconds, starting force exiting the process.");
724+
std::thread::sleep(Duration::from_secs(1));
726725
std::process::exit(1);
727-
// Wait for the shutdown manager to finish
728726
})
729727
.expect("Failed to spawn Force shutdown thread");
730728

0 commit comments

Comments
 (0)