forked from TrueCloudLab/rclone
fix: close cpu profile
Signed-off-by: guoguangwu <guoguangwug@gmail.com>
This commit is contained in:
parent
8817ee25ae
commit
2ab2ec29f9
1 changed files with 5 additions and 0 deletions
|
@ -444,6 +444,11 @@ func initConfig() {
|
||||||
}
|
}
|
||||||
atexit.Register(func() {
|
atexit.Register(func() {
|
||||||
pprof.StopCPUProfile()
|
pprof.StopCPUProfile()
|
||||||
|
err := f.Close()
|
||||||
|
if err != nil {
|
||||||
|
err = fs.CountError(err)
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue