Skip to content

Commit

Permalink
chore: check the return value of profiler.Stop
Browse files Browse the repository at this point in the history
  • Loading branch information
tgragnato committed Jan 18, 2025
1 parent 5d261e1 commit e67c711
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ func main() {
if err != nil {
log.Fatalf("could not start pyroscope %s\n", err.Error())
}
defer profiler.Stop()
defer func() {
if err := profiler.Stop(); err != nil {
log.Printf("Could not stop pyroscope! %s\n", err.Error())
}
}()
}

database, err := persistence.MakeDatabase(opFlags.DatabaseURL)
Expand Down

0 comments on commit e67c711

Please sign in to comment.