From c0063a859c959f15efbba4f1812b2335137d8d4a Mon Sep 17 00:00:00 2001 From: Lenny-Campino Hartmann Date: Thu, 9 Aug 2018 08:22:18 +0200 Subject: [PATCH] fixed missing else statement when creating nats connection --- pkg/endpoint/nats.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/endpoint/nats.go b/pkg/endpoint/nats.go index f63e4d05..4413f9a4 100644 --- a/pkg/endpoint/nats.go +++ b/pkg/endpoint/nats.go @@ -63,8 +63,9 @@ func (conn *NATSConn) Send(msg string) error { var err error if conn.ep.NATS.User != "" && conn.ep.NATS.Pass != "" { conn.conn, err = nats.Connect(addr, nats.UserInfo(conn.ep.NATS.User, conn.ep.NATS.Pass)) + } else { + conn.conn, err = nats.Connect(addr) } - conn.conn, err = nats.Connect(addr) if err != nil { conn.close() return err