From 6b6cd0bed553ada887632524994e4de4e839688e Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Tue, 28 Nov 2023 13:24:54 +0000 Subject: [PATCH] Fix `PPROFLISTEN` --- src/core/debug.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/debug.go b/src/core/debug.go index a6eb5e2..354c2ec 100644 --- a/src/core/debug.go +++ b/src/core/debug.go @@ -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)) + }() } }