refactor(logic): 调整PprofWeb启动逻辑位置 将PprofWeb的goroutine启动从debug条件块内移出到条件块外, 确保无论是否为调试模式都能正确启动Pprof服务 ```
This commit is contained in:
@@ -65,9 +65,8 @@ func Start() {
|
|||||||
if cool.Config.ServerInfo.IsDebug == 1 {
|
if cool.Config.ServerInfo.IsDebug == 1 {
|
||||||
g.DB().SetDebug(true)
|
g.DB().SetDebug(true)
|
||||||
|
|
||||||
go PprofWeb()
|
|
||||||
}
|
}
|
||||||
|
go PprofWeb()
|
||||||
port, err := determinePort(cool.Config.ServerInfo.CanPort)
|
port, err := determinePort(cool.Config.ServerInfo.CanPort)
|
||||||
cool.Config.ServerInfo.Port = uint32(port)
|
cool.Config.ServerInfo.Port = uint32(port)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user