Skip to content

Commit

Permalink
fix: govern host and port (#891)
Browse files Browse the repository at this point in the history
  • Loading branch information
sysulq authored May 24, 2023
1 parent 2760c22 commit 758cdaa
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions pkg/server/governor/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/douyu/jupiter/pkg/conf"
"github.com/douyu/jupiter/pkg/core/constant"
"github.com/douyu/jupiter/pkg/util/xnet"
"github.com/douyu/jupiter/pkg/flag"
"github.com/douyu/jupiter/pkg/xlog"
)

Expand Down Expand Up @@ -49,16 +49,12 @@ func RawConfig(key string) *Config {
// DefaultConfig represents default config
// User should construct config base on DefaultConfig
func DefaultConfig() *Config {
host, port, err := xnet.GetLocalMainIP()
if err != nil {
host = "localhost"
}

return &Config{
Enable: true,
Host: host,
Host: flag.String("host"),
Network: "tcp4",
Port: port,
Port: 9093,
logger: xlog.Jupiter().With(xlog.FieldMod(ModName)),
}
}
Expand Down

0 comments on commit 758cdaa

Please sign in to comment.