Make nats reusable after disconnection
This commit is contained in:
parent
109f13d3f2
commit
a3fcb74f93
2
nats.go
2
nats.go
@ -85,7 +85,7 @@ func setAddrs(addrs []string) []string {
|
||||
}
|
||||
|
||||
func (n *nbroker) Connect() error {
|
||||
if n.conn != nil {
|
||||
if n.conn != nil && n.conn.IsConnected() {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user