Skip to content

Commit

Permalink
fix(pprof): only run pprof service if enabled (ChainSafe#2073)
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 authored Nov 27, 2021
1 parent 88685cc commit 55669c5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dot/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,9 @@ func NewNode(cfg *Config, ks *keystore.GlobalKeystore) (*Node, error) {
networkSrvc *network.Service
)

nodeSrvcs = append(nodeSrvcs, createPprofService(cfg.Pprof.Settings))
if cfg.Pprof.Enabled {
nodeSrvcs = append(nodeSrvcs, createPprofService(cfg.Pprof.Settings))
}

stateSrvc, err := createStateService(cfg)
if err != nil {
Expand Down

0 comments on commit 55669c5

Please sign in to comment.