diff --git a/weed/util/grace/pprof.go b/weed/util/grace/pprof.go index ad1b1de393..ddd0b44755 100644 --- a/weed/util/grace/pprof.go +++ b/weed/util/grace/pprof.go @@ -34,6 +34,7 @@ func SetupProfiling(cpuProfile, memProfile string) { pprof.StartCPUProfile(f) OnInterrupt(func() { pprof.StopCPUProfile() + f.Close() // write block pprof blockF, err := os.Create(cpuProfile + ".block")