Skip to content

Commit

Permalink
fix(playground): use the advertised host instead of 0.0.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jsvisa committed Feb 23, 2021
1 parent 4544229 commit 72b59c6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/playground/playground.go
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ func (p *Playground) sanitizeConfig(boot instance.Config, cfg *instance.Config)
cfg.ConfigPath = boot.ConfigPath
}
if cfg.Host == "" {
cfg.Host = boot.ConfigPath
cfg.Host = boot.Host
}

path, err := getAbsolutePath(cfg.ConfigPath)
Expand Down Expand Up @@ -610,6 +610,9 @@ func (p *Playground) addInstance(componentID string, cfg instance.Config) (ins i
host = cfg.Host
}

// use the advertised host instead of 0.0.0.0
host = instance.AdvertiseHost(host)

switch componentID {
case "pd":
inst := instance.NewPDInstance(cfg.BinPath, dir, host, cfg.ConfigPath, id)
Expand Down

0 comments on commit 72b59c6

Please sign in to comment.