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 Max Eshleman committed Feb 13, 2019
1 parent 306a3cf commit 36e4d4e
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 36e4d4e

Please sign in to comment.