Skip to content

Commit

Permalink
Run stop logic only if required in prometheus input (influxdata#5144)
Browse files Browse the repository at this point in the history
  • Loading branch information
glinton authored and Mathieu Lecarme committed Apr 17, 2020
1 parent 0cf4373 commit 754253b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/inputs/prometheus/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,9 @@ func (p *Prometheus) Start(a telegraf.Accumulator) error {
}

func (p *Prometheus) Stop() {
p.cancel()
if p.MonitorPods {
p.cancel()
}
p.wg.Wait()
}

Expand Down

0 comments on commit 754253b

Please sign in to comment.