File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments