mirror of
https://github.com/Icinga/icingadb.git
synced 2026-06-06 15:22:08 -04:00
Don't allow 0 for max_connections database option
0 stands for deactivate, which makes no sense here.
This commit is contained in:
parent
50473bca70
commit
8232000524
1 changed files with 3 additions and 0 deletions
|
|
@ -67,6 +67,9 @@ func (o *Options) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
|||
return internal.CantUnmarshalYAML(err, o)
|
||||
}
|
||||
|
||||
if o.MaxConnections == 0 {
|
||||
return errors.New("max_connections cannot be 0. Configure a value greater than zero, or use -1 for no connection limit")
|
||||
}
|
||||
if o.MaxConnectionsPerTable < 1 {
|
||||
return errors.New("max_connections_per_table must be at least 1")
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue