diff --git a/src/server/main.go b/src/server/main.go index 0617485d..92ba76e1 100644 --- a/src/server/main.go +++ b/src/server/main.go @@ -1,6 +1,7 @@ package main import ( + "fmt" "net/http" _ "net/http/pprof" "runtime/debug" @@ -27,7 +28,8 @@ func main() { // 启动 pprof(仅绑定本地) go func() { // 如果需要绑定所有接口改为 ":6060" - _ = http.ListenAndServe("127.0.0.1:6060", nil) + port := 6060 + conf.Server.ServerID + _ = http.ListenAndServe(fmt.Sprintf("127.0.0.1:%d", port), nil) }() leaf.Run(