From 4387cf38d7ace5219422e67c513162be0dec8756 Mon Sep 17 00:00:00 2001 From: Timo Reimann Date: Wed, 6 Dec 2017 14:54:03 +0100 Subject: [PATCH] Close ring buffer used in throttling function. --- server/server.go | 1 + 1 file changed, 1 insertion(+) diff --git a/server/server.go b/server/server.go index e2255131a..3fa94268b 100644 --- a/server/server.go +++ b/server/server.go @@ -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 {