Skip to content

Commit b6edd93

Browse files
committed
Close cpu profile file at exit
1 parent 19c9f15 commit b6edd93

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cmd/mc-router/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ func main() {
4848
if err != nil {
4949
logrus.WithError(err).Fatal("trying to create cpu profile file")
5050
}
51+
defer cpuProfileFile.Close()
5152

5253
logrus.WithField("file", *cpuProfileFile).Info("Starting cpu profiling")
5354
err = pprof.StartCPUProfile(cpuProfileFile)

0 commit comments

Comments
 (0)