Skip to content

Commit

Permalink
Use CONSUL_TLS_SERVER_NAME for watches if ssl is enabled in agent
Browse files Browse the repository at this point in the history
While setup consul watches make sure that we are establishing connection to the correct CONSUL_TLS_SERVER_NAME if agent is configured to use SSL (CONSUL_HTTP_SSL=true)

This is initial attempt to fix hashicorp#4718

Extended debugging capabilities of the agent.
  • Loading branch information
vaLski committed Sep 28, 2018
1 parent f680026 commit 06c5d88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ func (a *Agent) reloadWatches(cfg *config.RuntimeConfig) error {

addr := config.Address
if config.Scheme == "https" {
addr = "https://" + addr
addr = "https://" + config.TLSConfig.Address
}

if err := wp.RunWithConfig(addr, config); err != nil {
Expand Down

0 comments on commit 06c5d88

Please sign in to comment.