Fix PPROFLISTEN

This commit is contained in:
Neil Alexander 2023-11-28 13:24:54 +00:00
parent 3d15da34ad
commit 6b6cd0bed5
No known key found for this signature in database
GPG Key ID: A02A2019A2BB0944

View File

@ -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))
}()
}
}