Run stop logic only if required in prometheus input (#5144)
This commit is contained in:
@@ -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()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user