mirror of https://github.com/minio/minio.git
Adding error check for jetstream connection (#15252)
This commit is contained in:
parent
cf9e3069f2
commit
3bdb92fcad
|
@ -256,11 +256,13 @@ func (target *NATSTarget) IsActive() (bool, error) {
|
|||
|
||||
if target.natsConn != nil && target.args.JetStream.Enable {
|
||||
target.jstream, connErr = target.natsConn.JetStream()
|
||||
if connErr != nil {
|
||||
if connErr.Error() == nats.ErrNoServers.Error() {
|
||||
return false, errNotConnected
|
||||
}
|
||||
return false, connErr
|
||||
}
|
||||
}
|
||||
|
||||
return true, nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue