File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
src/append/rolling_file/policy/compound/trigger Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -204,7 +204,8 @@ impl TimeTrigger {
204
204
#[ cfg( not( test) ) ]
205
205
let current = Local :: now ( ) ;
206
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 ) ;
207
+ let next_time = TimeTrigger :: get_next_time ( current, config. interval , config. modulate )
208
+ . unwrap_or ( current + Duration :: try_seconds ( 1_i64 ) . unwrap ( ) ) ;
208
209
let next_roll_time = if config. max_random_delay > 0 {
209
210
let random_delay = rand:: thread_rng ( ) . gen_range ( 0 ..config. max_random_delay ) ;
210
211
// This is a valid unwrap because chrono::Duration::try_milliseconds accepts an i64
You can’t perform that action at this time.
0 commit comments