mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2024-12-26 15:29:04 +01:00
Check length of receiver type configuration
This commit is contained in:
parent
ac41f02dfc
commit
7106e465ad
@ -170,7 +170,7 @@ func main() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
// Setup receiver
|
// Setup receiver
|
||||||
if config.Receiver.Type != "none" {
|
if len(config.Receiver.Type) > 0 && config.Receiver.Type != "none" {
|
||||||
if _, found := Receivers[config.Receiver.Type]; !found {
|
if _, found := Receivers[config.Receiver.Type]; !found {
|
||||||
log.Print("Invalid receiver type '", config.Receiver.Type, "' in configuration")
|
log.Print("Invalid receiver type '", config.Receiver.Type, "' in configuration")
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user