Skip to content

Commit

Permalink
Remove duplicate http.Server
Browse files Browse the repository at this point in the history
  • Loading branch information
sevagh committed Jun 3, 2019
1 parent 3676bcc commit ba71588
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions prometheus_metrics/prommetrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,8 @@ func InitHTTPServer(listenAddr string, shutdownContext context.Context) (func()
return shutdownClosure, err
}

server := &http.Server{}
go func() {
if err := server.Serve(listener); err != nil {
if err := promSrv.Serve(listener); err != nil {
logrus.Fatalf("prometheus http serve failed: %s", err.Error())
}
}()
Expand Down

0 comments on commit ba71588

Please sign in to comment.