[bugfix] Fix interrupt hook overwritten bug

This commit is contained in:
Alex Wang
2018-10-09 15:41:57 +08:00
parent 1d3f045e85
commit 4db68669b6
2 changed files with 20 additions and 6 deletions

View File

@@ -14,7 +14,6 @@ func SetupProfiling(cpuProfile, memProfile string) {
glog.Fatal(err)
}
pprof.StartCPUProfile(f)
defer pprof.StopCPUProfile()
OnInterrupt(func() {
pprof.StopCPUProfile()
})