We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 87c3954 + db0df07 commit e3f818dCopy full SHA for e3f818d
registry/consul_registry.go
@@ -59,6 +59,9 @@ func newConsulRegistry(opts ...Option) Registry {
59
config = c
60
}
61
62
+ if config.HttpClient == nil {
63
+ config.HttpClient = new(http.Client)
64
+ }
65
66
// set timeout
67
if options.Timeout > 0 {
@@ -81,9 +84,6 @@ func newConsulRegistry(opts ...Option) Registry {
81
84
if options.Secure || options.TLSConfig != nil {
82
85
config.Scheme = "https"
83
86
// We're going to support InsecureSkipVerify
- if config.HttpClient == nil {
- config.HttpClient = new(http.Client)
- }
87
config.HttpClient.Transport = newTransport(options.TLSConfig)
88
89
0 commit comments