From a52d3df5f9aaf0b6ae73bb4654bd5bc1d7cf6d09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=94=E5=BF=B5?= <12574910+72wo@users.noreply.github.com> Date: Sun, 29 Mar 2026 02:11:21 +0800 Subject: [PATCH] =?UTF-8?q?```=20refactor(logic):=20=E8=B0=83=E6=95=B4Ppro?= =?UTF-8?q?fWeb=E5=90=AF=E5=8A=A8=E9=80=BB=E8=BE=91=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将PprofWeb的goroutine启动从debug条件块内移出到条件块外, 确保无论是否为调试模式都能正确启动Pprof服务 ``` --- logic/server.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/logic/server.go b/logic/server.go index 4fdfb15f8..d32a281b5 100644 --- a/logic/server.go +++ b/logic/server.go @@ -65,9 +65,8 @@ func Start() { if cool.Config.ServerInfo.IsDebug == 1 { g.DB().SetDebug(true) - go PprofWeb() } - + go PprofWeb() port, err := determinePort(cool.Config.ServerInfo.CanPort) cool.Config.ServerInfo.Port = uint32(port) if err != nil {