Skip to content

Commit

Permalink
If no clusterAddr is given but we have a single synthesized cluster a…
Browse files Browse the repository at this point in the history
…ddresses, automatically use it. (#3486)
  • Loading branch information
jefferai authored Oct 24, 2017
1 parent f8e6f9e commit ea60ab6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions vault/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,9 @@ func (c *Core) ClusterTLSConfig() (*tls.Config, error) {

func (c *Core) SetClusterListenerAddrs(addrs []*net.TCPAddr) {
c.clusterListenerAddrs = addrs
if c.clusterAddr == "" && len(addrs) == 1 {
c.clusterAddr = addrs[0].String()
}
}

func (c *Core) SetClusterHandler(handler http.Handler) {
Expand Down

0 comments on commit ea60ab6

Please sign in to comment.