Skip to content

Commit

Permalink
Merge pull request #196 from sarbash/fix-tls-consul-registry
Browse files Browse the repository at this point in the history
Fixes nil pointer dereferencing for Consul TLS transport
  • Loading branch information
Asim Aslam authored Aug 15, 2017
2 parents 382abbf + fd01ead commit 87c3954
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions registry/consul_registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ func newConsulRegistry(opts ...Option) Registry {
if options.Secure || options.TLSConfig != nil {
config.Scheme = "https"
// We're going to support InsecureSkipVerify
if config.HttpClient == nil {
config.HttpClient = new(http.Client)
}
config.HttpClient.Transport = newTransport(options.TLSConfig)
}

Expand Down

0 comments on commit 87c3954

Please sign in to comment.