From ae8646ebfcf1fb278cc304c54184140bb603362c Mon Sep 17 00:00:00 2001 From: Jacky Date: Sun, 4 May 2025 22:56:52 +0800 Subject: [PATCH] debug: add pprof in master process --- main.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main.go b/main.go index cb9eb0b9..fa8ec366 100644 --- a/main.go +++ b/main.go @@ -4,11 +4,14 @@ import ( "context" "crypto/tls" "fmt" + "log" "net" "net/http" "os/signal" "syscall" + _ "net/http/pprof" + "github.com/0xJacky/Nginx-UI/internal/cert" "github.com/0xJacky/Nginx-UI/internal/cmd" @@ -103,6 +106,10 @@ func main() { ctx, cancel := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM) defer cancel() + go func() { + log.Println(http.ListenAndServe(":6060", nil)) + }() + err := risefront.New(ctx, risefront.Config{ Run: Program(ctx, confPath), Name: "nginx-ui",