Skip to content

Commit 55669c5

Browse files
authored
fix(pprof): only run pprof service if enabled (#2073)
1 parent 88685cc commit 55669c5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

dot/node.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,9 @@ func NewNode(cfg *Config, ks *keystore.GlobalKeystore) (*Node, error) {
195195
networkSrvc *network.Service
196196
)
197197

198-
nodeSrvcs = append(nodeSrvcs, createPprofService(cfg.Pprof.Settings))
198+
if cfg.Pprof.Enabled {
199+
nodeSrvcs = append(nodeSrvcs, createPprofService(cfg.Pprof.Settings))
200+
}
199201

200202
stateSrvc, err := createStateService(cfg)
201203
if err != nil {

0 commit comments

Comments
 (0)