mirror of
https://github.com/Icinga/icingadb.git
synced 2026-05-28 04:35:54 -04:00
Don't allow 0 for timeout redis option
0 stands for deactivate, which makes no sense here.
This commit is contained in:
parent
8232000524
commit
fbbb9bfacd
1 changed files with 3 additions and 0 deletions
|
|
@ -45,6 +45,9 @@ func (o *Options) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
|||
return internal.CantUnmarshalYAML(err, o)
|
||||
}
|
||||
|
||||
if o.Timeout == 0 {
|
||||
return errors.New("timeout cannot be 0. Configure a value greater than zero, or use -1 for no timeout")
|
||||
}
|
||||
if o.MaxHMGetConnections < 1 {
|
||||
return errors.New("max_hmget_connections must be at least 1")
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue