Run stop logic only if required in prometheus input (#5144)
This commit is contained in:
parent
98231f8b6b
commit
891eff0930
|
@ -305,7 +305,9 @@ func (p *Prometheus) Start(a telegraf.Accumulator) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *Prometheus) Stop() {
|
func (p *Prometheus) Stop() {
|
||||||
p.cancel()
|
if p.MonitorPods {
|
||||||
|
p.cancel()
|
||||||
|
}
|
||||||
p.wg.Wait()
|
p.wg.Wait()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue