Commit a1df0c2a authored by ale's avatar ale

Prime the ConfigManager.Notify channel with a value

parent 46f7117a
......@@ -253,7 +253,10 @@ func (m *ConfigManager) Notify() <-chan struct{} {
m.mx.Lock()
defer m.mx.Unlock()
// Create the channel and prime it with a value so the
// listener loads its initial configuration.
ch := make(chan struct{}, 1)
ch <- struct{}{}
m.listeners = append(m.listeners, ch)
return ch
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment