All checks were successful
check / check (push) Successful in 2m59s
envDuration accepted 0s and negative values, and RETENTION_SWEEP_INTERVAL feeds time.NewTicker in both the retention reaper and the archive sweeper. NewTicker panics on a non-positive period, and both tickers are created in goroutines with no recover, so a bad value aborted the process after startup had already logged "Configuration loaded". Add envPositiveDuration, mirroring envPort's wrapping of envPositiveInt, and use it for RETENTION_SWEEP_INTERVAL. It wraps ErrNonPositiveValue and names the variable, the same failure shape PORT and RECEIVER_RATE_LIMIT already have. SESSION_IDLE_TIMEOUT, the only other envDuration caller, stays on envDuration: non-positive there means idle expiry is disabled, which is documented behaviour and guarded at both use sites.
12 KiB
12 KiB