From 9dd0e3dc4490a27984fa91ddeca2b2d3a6482151 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Mon, 22 Aug 2016 16:04:04 -0700 Subject: [PATCH] config: Initialize notify for fresh configs. (#2531) --- cmd/config-v6.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmd/config-v6.go b/cmd/config-v6.go index e956f2338..6c742227c 100644 --- a/cmd/config-v6.go +++ b/cmd/config-v6.go @@ -55,6 +55,14 @@ func initConfig() error { Enable: true, Level: "fatal", } + + // Make sure to initialize notification configs. + srvCfg.Notify.AMQP = make(map[string]amqpNotify) + srvCfg.Notify.AMQP["1"] = amqpNotify{} + srvCfg.Notify.ElasticSearch = make(map[string]elasticSearchNotify) + srvCfg.Notify.ElasticSearch["1"] = elasticSearchNotify{} + srvCfg.Notify.Redis = make(map[string]redisNotify) + srvCfg.Notify.Redis["1"] = redisNotify{} srvCfg.rwMutex = &sync.RWMutex{} // Create config path.