mirror of
https://github.com/restic/rest-server.git
synced 2025-12-07 09:36:13 -08:00
Check error
This commit is contained in:
@@ -97,8 +97,11 @@ func runRoot(cmd *cobra.Command, args []string) error {
|
|||||||
go func() {
|
go func() {
|
||||||
for range sigintCh {
|
for range sigintCh {
|
||||||
pprof.StopCPUProfile()
|
pprof.StopCPUProfile()
|
||||||
f.Close()
|
|
||||||
log.Println("Stopped CPU profiling")
|
log.Println("Stopped CPU profiling")
|
||||||
|
err := f.Close()
|
||||||
|
if err != nil {
|
||||||
|
log.Printf("error closing CPU profile file: %v", err)
|
||||||
|
}
|
||||||
os.Exit(130)
|
os.Exit(130)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|||||||
Reference in New Issue
Block a user