forked from cerc-io/plugeth
@@ -19,6 +19,7 @@ package debug
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
"net/http"
|
||||
_ "net/http/pprof"
|
||||
"os"
|
||||
@@ -308,7 +309,7 @@ func Setup(ctx *cli.Context) error {
|
||||
|
||||
port := ctx.Int(pprofPortFlag.Name)
|
||||
|
||||
address := fmt.Sprintf("%s:%d", listenHost, port)
|
||||
address := net.JoinHostPort(listenHost, fmt.Sprintf("%d", port))
|
||||
// This context value ("metrics.addr") represents the utils.MetricsHTTPFlag.Name.
|
||||
// It cannot be imported because it will cause a cyclical dependency.
|
||||
StartPProf(address, !ctx.IsSet("metrics.addr"))
|
||||
|
||||
Reference in New Issue
Block a user