1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 19:17:43 +00:00

tail: "_timeout_counter" -> "timeout_counter"

This commit is contained in:
Daniel Hofstetter 2022-11-29 10:25:48 +01:00 committed by Sylvestre Ledru
parent 306a58a731
commit a4a69c8ee7

View file

@ -479,7 +479,7 @@ pub fn follow(mut observer: Observer, settings: &Settings) -> UResult<()> {
let mut process = platform::ProcessChecker::new(observer.pid);
let mut _timeout_counter = 0;
let mut timeout_counter = 0;
// main follow loop
loop {
@ -528,7 +528,7 @@ pub fn follow(mut observer: Observer, settings: &Settings) -> UResult<()> {
.receiver
.recv_timeout(settings.sleep_sec);
if rx_result.is_ok() {
_timeout_counter = 0;
timeout_counter = 0;
}
let mut paths = vec![]; // Paths worth checking for new content to print
@ -567,7 +567,7 @@ pub fn follow(mut observer: Observer, settings: &Settings) -> UResult<()> {
}
Ok(Err(e)) => return Err(USimpleError::new(1, format!("NotifyError: {e}"))),
Err(mpsc::RecvTimeoutError::Timeout) => {
_timeout_counter += 1;
timeout_counter += 1;
}
Err(e) => return Err(USimpleError::new(1, format!("RecvTimeoutError: {e}"))),
}
@ -584,7 +584,7 @@ pub fn follow(mut observer: Observer, settings: &Settings) -> UResult<()> {
_read_some = observer.files.tail_file(path, settings.verbose)?;
}
if _timeout_counter == settings.max_unchanged_stats {
if timeout_counter == settings.max_unchanged_stats {
/*
TODO: [2021-10; jhscheer] implement timeout_counter for each file.
--max-unchanged-stats=n