Run stop logic only if required in prometheus input (#5144)

This commit is contained in:
Greg 2018-12-14 15:34:05 -07:00 committed by Daniel Nelson
parent 98231f8b6b
commit 891eff0930
1 changed files with 3 additions and 1 deletions

View File

@ -305,7 +305,9 @@ func (p *Prometheus) Start(a telegraf.Accumulator) error {
} }
func (p *Prometheus) Stop() { func (p *Prometheus) Stop() {
if p.MonitorPods {
p.cancel() p.cancel()
}
p.wg.Wait() p.wg.Wait()
} }