mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 07:26:55 +08:00
fix: race error
This commit is contained in:
@@ -44,7 +44,7 @@ func startMemoryProfile(file string, duration time.Duration) (err error) {
|
||||
|
||||
log.Info().Dur("duration", duration).Msg("Start memory profiling")
|
||||
time.AfterFunc(duration, func() {
|
||||
err = pprof.WriteHeapProfile(f)
|
||||
err := pprof.WriteHeapProfile(f)
|
||||
if err != nil {
|
||||
log.Error().Err(err).Msg("failed to write memory profile")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user