Log configuration errors from providers and keeps listening

This commit is contained in:
Gérald Croës 2018-11-26 18:52:03 +01:00 committed by Traefiker Bot
parent d63636243c
commit e42ddfc3d6

View file

@ -233,10 +233,14 @@ func (s *Server) listenProviders(stop chan bool) {
case <-stop:
return
case configMsg, ok := <-s.configurationChan:
if !ok || configMsg.Configuration == nil {
if !ok {
return
}
s.preLoadConfiguration(configMsg)
if configMsg.Configuration != nil {
s.preLoadConfiguration(configMsg)
} else {
log.Debugf("Received nil configuration from provider %q, skipping.", configMsg.ProviderName)
}
}
}
}