Skip to content

Commit

Permalink
panic fix: prometheus listen
Browse files Browse the repository at this point in the history
  • Loading branch information
samcm committed May 18, 2022
1 parent 1bce3b3 commit 1b6823c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/exporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,7 @@ func (e *exporter) Serve(ctx context.Context, port int) error {

http.Handle("/metrics", promhttp.Handler())

if err := http.ListenAndServe(fmt.Sprintf(":%v", port), nil); err != nil {
return err
}
err := http.ListenAndServe(fmt.Sprintf(":%v", port), nil)

return nil
return err
}

0 comments on commit 1b6823c

Please sign in to comment.