Skip to content

Commit

Permalink
tidb-server: throw error when starting with multi advertise address (p…
Browse files Browse the repository at this point in the history
  • Loading branch information
TszKitLo40 authored Dec 23, 2020
1 parent 3e5c56e commit 4f44c0d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tidb-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,11 @@ func overrideConfig(cfg *config.Config) {
cfg.Host = *host
}
if actualFlags[nmAdvertiseAddress] {
var err error
if len(strings.Split(*advertiseAddress, " ")) > 1 {
err = errors.Errorf("Only support one advertise-address")
}
terror.MustNil(err)
cfg.AdvertiseAddress = *advertiseAddress
}
if len(cfg.AdvertiseAddress) == 0 && cfg.Host == "0.0.0.0" {
Expand Down

0 comments on commit 4f44c0d

Please sign in to comment.