1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

chore: require at least one database connection

This commit is contained in:
Ferdinand Mütsch 2021-02-02 22:52:13 +01:00
parent 1dc5be4784
commit a7afd73e62

View File

@ -312,6 +312,10 @@ func Load() *Config {
logbuch.Fatal("either of listen_ipv4 or listen_ipv6 must be set") logbuch.Fatal("either of listen_ipv4 or listen_ipv6 must be set")
} }
if config.Db.MaxConn <= 0 {
logbuch.Fatal("you must allow at least one database connection")
}
Set(config) Set(config)
return Get() return Get()
} }