fix disabled pprof server handling

This commit is contained in:
leonincs
2026-04-23 19:00:13 +08:00
parent d7a0e2a6b7
commit 458f4f361d
3 changed files with 20 additions and 16 deletions

View File

@@ -78,7 +78,9 @@ func main() {
if err != nil {
log.Printf("Failed to start API pprof server: %v", err)
}
defer pprofServer.Close()
if pprofServer != nil {
defer pprofServer.Close()
}
// 设置路由
r := apphttp.SetRouter(sqlDB, cache, rmq)