Update to check tls config

This commit is contained in:
Asim 2016-01-17 00:37:55 +00:00 committed by Vasiliy Tolstov
parent 96937ae487
commit 0745de181c

View File

@ -70,6 +70,11 @@ func (n *nbroker) Connect() error {
opts.Secure = n.opts.Secure
opts.TLSConfig = n.opts.TLSConfig
// secure might not be set
if n.opts.TLSConfig != nil {
opts.Secure = true
}
c, err := opts.Connect()
if err != nil {
return err