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 otherpirate committed Mar 15, 2019
1 parent 8ab4f67 commit bb7d1cd
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 bb7d1cd

Please sign in to comment.