mirror of
https://github.com/slackhq/nebula.git
synced 2026-11-15 01:36:52 +01:00
disallow negative stats intervals (#1754)
This commit is contained in:
1 parent
3db406b8ac
commit
e028e6bf1a
1 file changed
+1
-1
@@ -331,7 +331,7 @@ func loadStatsConfig(c *config.C) (statsConfig, error) {
|
||||
}
|
||||
|
||||
cfg.interval = c.GetDuration("stats.interval", 0)
|
||||
if cfg.interval == 0 {
|
||||
if cfg.interval <= 0 {
|
||||
return cfg, fmt.Errorf("stats.interval was an invalid duration: %s", c.GetString("stats.interval", ""))
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user