Skip to content

Commit

Permalink
fix: close cpu profile
Browse files Browse the repository at this point in the history
  • Loading branch information
testwill committed Apr 4, 2024
1 parent 9db4a30 commit 9025b70
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions common/profiler/cpu_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func NewCPUWithShutdown(path string, shutdownC <-chan struct{}) (*CPU, error) {
if err != nil {
return nil, err
}
defer f.Close()
if err := pprof.StartCPUProfile(f); err != nil {
return nil, err
}
Expand Down

0 comments on commit 9025b70

Please sign in to comment.