Decrement threshold on first call

next
Sayan Nandan 3 years ago
parent 0b87452b97
commit ed66e4f291
No known key found for this signature in database
GPG Key ID: 8BC07A0A4D41DD52

@ -202,16 +202,16 @@ pub fn finalize_shutdown(corestore: Corestore, pid_file: FileLock) {
};
let mut threshold = TERMSIG_THRESHOLD;
macro_rules! check_threshold {
() => {
() => {{
threshold -= 1;
if threshold == 0 {
log::error!("SIGTERM received but failed to flush data. Quitting because threshold exceeded");
break false;
} else {
log::error!("SIGTERM received but failed to flush data. Threshold is at {threshold}");
threshold -= 1;
continue;
}
};
}};
}
loop {
#[cfg(not(unix))]

Loading…
Cancel
Save