diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 279cd80008d..48ff009ba98 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -35,6 +35,7 @@ https://github.com/elastic/beats/compare/v6.0.0-alpha1...master[Check the HEAD d *Heartbeat* *Metricbeat* +- Fix a debug statement that said a module wrapper had stopped when it hadn't. {pull}4264[4264] *Packetbeat* @@ -71,7 +72,7 @@ https://github.com/elastic/beats/compare/v6.0.0-alpha1...master[Check the HEAD d *Winlogbeat* -==== Knwon Issue +==== Known Issue //////////////////////////////////////////////////////////// @@ -192,7 +193,7 @@ https://github.com/elastic/beats/compare/v5.4.0...v6.0.0-alpha1[View commits] *Winlogbeat* -==== Knwon Issue +==== Known Issue *Filebeat* diff --git a/metricbeat/mb/module/wrapper.go b/metricbeat/mb/module/wrapper.go index 3fda4b2f393..a6e1e43c318 100644 --- a/metricbeat/mb/module/wrapper.go +++ b/metricbeat/mb/module/wrapper.go @@ -131,7 +131,6 @@ func NewWrappers(modulesConfig []*common.Config, r *mb.Register) ([]*Wrapper, er // Start should be called only once in the life of a Wrapper. func (mw *Wrapper) Start(done <-chan struct{}) <-chan common.MapStr { debugf("Starting %s", mw) - defer debugf("Stopped %s", mw) out := make(chan common.MapStr, 1) @@ -151,6 +150,7 @@ func (mw *Wrapper) Start(done <-chan struct{}) <-chan common.MapStr { go func() { wg.Wait() close(out) + debugf("Stopped %s", mw) }() return out