1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-11-30 08:06:40 +02:00

Merge pull request #196 from sarbash/fix-tls-consul-registry

Fixes nil pointer dereferencing for Consul TLS transport
This commit is contained in:
Asim Aslam 2017-08-15 08:08:03 +01:00 committed by GitHub
commit 87c39542b0

View File

@ -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)
}