Fix CPU Profiling (#2328)

* fix

* fix validator too
This commit is contained in:
Nishant Das 2019-04-22 09:42:34 +08:00 committed by Raul Jordan
parent 1df15f72c4
commit 68a9a42611
2 changed files with 2 additions and 2 deletions

View File

@ -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")
}()

View File

@ -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")
}()