We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 88e123e commit 303d009Copy full SHA for 303d009
src/append/rolling_file/policy/compound/trigger/time.rs
@@ -204,7 +204,8 @@ impl TimeTrigger {
204
#[cfg(not(test))]
205
let current = Local::now();
206
// In the case where bad user input results in an invalid next time, provide a valid time.
207
- let next_time = TimeTrigger::get_next_time(current, config.interval, config.modulate).unwrap_or(i64::MAX);
+ let next_time = TimeTrigger::get_next_time(current, config.interval, config.modulate)
208
+ .unwrap_or(current + Duration::try_seconds(1_i64).unwrap());
209
let next_roll_time = if config.max_random_delay > 0 {
210
let random_delay = rand::thread_rng().gen_range(0..config.max_random_delay);
211
// This is a valid unwrap because chrono::Duration::try_milliseconds accepts an i64
0 commit comments