Make nats reusable after disconnection

This commit is contained in:
Shannon Wynter 2018-09-03 09:15:45 +10:00 committed by Vasiliy Tolstov
parent 109f13d3f2
commit a3fcb74f93

View File

@ -85,7 +85,7 @@ func setAddrs(addrs []string) []string {
} }
func (n *nbroker) Connect() error { func (n *nbroker) Connect() error {
if n.conn != nil { if n.conn != nil && n.conn.IsConnected() {
return nil return nil
} }