Skip to content

Commit

Permalink
Fix PPROFLISTEN
Browse files Browse the repository at this point in the history
  • Loading branch information
neilalexander committed Nov 28, 2023
1 parent 3d15da3 commit 6b6cd0b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ func init() {
envVarName := "PPROFLISTEN"
if hostPort := os.Getenv(envVarName); hostPort != "" {
fmt.Fprintf(os.Stderr, "DEBUG: Starting pprof on %s\n", hostPort)
go fmt.Println(http.ListenAndServe(hostPort, nil))
go func() {
fmt.Fprintf(os.Stderr, "DEBUG: %s", http.ListenAndServe(hostPort, nil))
}()
}
}

0 comments on commit 6b6cd0b

Please sign in to comment.