Check length of receiver type configuration

This commit is contained in:
Thomas Roehl 2021-05-18 15:44:32 +02:00
parent ac41f02dfc
commit 7106e465ad

View File

@ -170,7 +170,7 @@ func main() {
return
}
// Setup receiver
if config.Receiver.Type != "none" {
if len(config.Receiver.Type) > 0 && config.Receiver.Type != "none" {
if _, found := Receivers[config.Receiver.Type]; !found {
log.Print("Invalid receiver type '", config.Receiver.Type, "' in configuration")
return