Skip to content

Commit

Permalink
fix check of max-age/min-age
Browse files Browse the repository at this point in the history
  • Loading branch information
davies committed May 31, 2024
1 parent fbe92e3 commit 7491e33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/sync/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func NewConfigFromCli(c *cli.Context) *Config {
if cfg.MinSize > cfg.MaxSize {
logger.Fatal("min-size should not be larger than max-size")
}
if cfg.MinAge > cfg.MaxAge {
if cfg.MaxAge > 0 && cfg.MinAge > cfg.MaxAge {
logger.Fatal("min-age should not be larger than max-age")
}
if cfg.Threads <= 0 {
Expand Down

0 comments on commit 7491e33

Please sign in to comment.