From 55669c54d158a31e06d20cb927281bc44bb9497b Mon Sep 17 00:00:00 2001 From: Quentin McGaw Date: Sat, 27 Nov 2021 10:01:31 +0100 Subject: [PATCH] fix(pprof): only run pprof service if enabled (#2073) --- dot/node.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dot/node.go b/dot/node.go index d780936ac2..057aad7794 100644 --- a/dot/node.go +++ b/dot/node.go @@ -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 {