diff --git a/beacon-chain/node/node.go b/beacon-chain/node/node.go index 34839b7a1..4f82e864f 100644 --- a/beacon-chain/node/node.go +++ b/beacon-chain/node/node.go @@ -137,6 +137,7 @@ func (b *BeaconNode) Start() { defer signal.Stop(sigc) <-sigc log.Info("Got interrupt, shutting down...") + debug.Exit(b.ctx) // Ensure trace and CPU profile data are flushed. go b.Close() for i := 10; i > 0; i-- { <-sigc @@ -144,7 +145,6 @@ func (b *BeaconNode) Start() { log.Info("Already shutting down, interrupt more to panic", "times", i-1) } } - debug.Exit(b.ctx) // Ensure trace and CPU profile data are flushed. panic("Panic closing the beacon node") }() diff --git a/validator/node/node.go b/validator/node/node.go index c78265db7..8aec59668 100644 --- a/validator/node/node.go +++ b/validator/node/node.go @@ -91,6 +91,7 @@ func (s *ValidatorClient) Start() { defer signal.Stop(sigc) <-sigc log.Info("Got interrupt, shutting down...") + debug.Exit(s.ctx) // Ensure trace and CPU profile data are flushed. go s.Close() for i := 10; i > 0; i-- { <-sigc @@ -98,7 +99,6 @@ func (s *ValidatorClient) Start() { log.Info("Already shutting down, interrupt more to panic.", "times", i-1) } } - debug.Exit(s.ctx) // Ensure trace and CPU profile data are flushed. panic("Panic closing the sharding validator") }()