Skip to content

Commit

Permalink
Fix prometheus output cannot be reloaded (#3053)
Browse files Browse the repository at this point in the history
(cherry picked from commit 82ea04f)
  • Loading branch information
danielnelson committed Jul 25, 2017
1 parent 7bbd3da commit d4536ad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/outputs/prometheus_client/prometheus_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ func (p *PrometheusClient) Connect() error {
func (p *PrometheusClient) Close() error {
ctx, cancel := context.WithTimeout(context.Background(), time.Second*5)
defer cancel()
return p.server.Shutdown(ctx)
err := p.server.Shutdown(ctx)
prometheus.Unregister(p)
return err
}

func (p *PrometheusClient) SampleConfig() string {
Expand Down

0 comments on commit d4536ad

Please sign in to comment.