Close ring buffer used in throttling function.

This commit is contained in:
Timo Reimann 2017-12-06 14:54:03 +01:00 committed by Traefiker
parent a9d38570ab
commit 4387cf38d7

View file

@ -374,6 +374,7 @@ func (s *Server) preLoadConfiguration(configMsg types.ConfigMessage) {
// it will publish the last of the newly received configurations.
func throttleProviderConfigReload(throttle time.Duration, publish chan<- types.ConfigMessage, in <-chan types.ConfigMessage, stop chan bool) {
ring := channels.NewRingChannel(1)
defer ring.Close()
safe.Go(func() {
for {