Update to check tls config
This commit is contained in:
parent
96937ae487
commit
0745de181c
5
nats.go
5
nats.go
@ -70,6 +70,11 @@ func (n *nbroker) Connect() error {
|
|||||||
opts.Secure = n.opts.Secure
|
opts.Secure = n.opts.Secure
|
||||||
opts.TLSConfig = n.opts.TLSConfig
|
opts.TLSConfig = n.opts.TLSConfig
|
||||||
|
|
||||||
|
// secure might not be set
|
||||||
|
if n.opts.TLSConfig != nil {
|
||||||
|
opts.Secure = true
|
||||||
|
}
|
||||||
|
|
||||||
c, err := opts.Connect()
|
c, err := opts.Connect()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user