fix http connector
This commit is contained in:
@ -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{
|
||||
|
@ -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))
|
||||
}()
|
||||
}
|
||||
|
Reference in New Issue
Block a user