mirror of https://github.com/minio/minio.git
configuring the nats target to reconnect forever (#16050)
This commit is contained in:
parent
bf89f79694
commit
66239f30ce
|
@ -160,7 +160,7 @@ func (n NATSArgs) Validate() error {
|
|||
|
||||
// To obtain a nats connection from args.
|
||||
func (n NATSArgs) connectNats() (*nats.Conn, error) {
|
||||
connOpts := []nats.Option{nats.Name("Minio Notification")}
|
||||
connOpts := []nats.Option{nats.Name("Minio Notification"), nats.MaxReconnects(-1)}
|
||||
if n.Username != "" && n.Password != "" {
|
||||
connOpts = append(connOpts, nats.UserInfo(n.Username, n.Password))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue