Skip to content

Commit

Permalink
Merge pull request #86 from ethpandaops/fix/server-pprof
Browse files Browse the repository at this point in the history
fix(server): handle omitted pprof config
  • Loading branch information
Savid authored Mar 2, 2023
2 parents 5ab84a1 + 5fafd24 commit 058c553
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,19 @@ func (x *Xatu) Start(ctx context.Context) error {

return nil
})
g.Go(func() error {
if err := x.startPProf(ctx); err != nil {
if err != http.ErrServerClosed {
return err

if x.config.PProfAddr != nil {
g.Go(func() error {
if err := x.startPProf(ctx); err != nil {
if err != http.ErrServerClosed {
return err
}
}
}

return nil
})
return nil
})
}

g.Go(func() error {
if err := x.startGrpcServer(ctx); err != nil {
return err
Expand Down

0 comments on commit 058c553

Please sign in to comment.