solve NewRegistry httpclient 'nil pointer dereference' bug
This commit is contained in:
parent
b8f20924cc
commit
d3f447a732
@ -105,11 +105,12 @@ func configure(c *consulRegistry, opts ...registry.Option) {
|
||||
}
|
||||
}
|
||||
|
||||
if config.HttpClient == nil {
|
||||
config.HttpClient = new(http.Client)
|
||||
}
|
||||
|
||||
// requires secure connection?
|
||||
if c.opts.Secure || c.opts.TLSConfig != nil {
|
||||
if config.HttpClient == nil {
|
||||
config.HttpClient = new(http.Client)
|
||||
}
|
||||
|
||||
config.Scheme = "https"
|
||||
// We're going to support InsecureSkipVerify
|
||||
|
Loading…
x
Reference in New Issue
Block a user