fix http connector

This commit is contained in:
ginuerzh
2022-01-28 16:13:43 +08:00
parent 1b22a5db9f
commit 0e9a975a26
5 changed files with 20 additions and 21 deletions

View File

@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"net/url"
"os"
"strings"
"time"
@ -31,6 +32,13 @@ func (l *stringList) Set(value string) error {
func buildConfigFromCmd(services, nodes stringList) (*config.Config, error) {
cfg := &config.Config{}
if v := os.Getenv("GOST_PROFILING"); v != "" {
cfg.Profiling = &config.ProfilingConfig{
Addr: v,
Enabled: true,
}
}
var chain *config.ChainConfig
if len(nodes) > 0 {
chain = &config.ChainConfig{

View File

@ -89,7 +89,7 @@ func main() {
if addr == "" {
addr = ":6060"
}
log.Info("profiling serve on: ", addr)
log.Info("profiling serve on ", addr)
log.Fatal(http.ListenAndServe(addr, nil))
}()
}