mirror of
https://github.com/postmannen/ctrl.git
synced 2024-12-14 12:37:31 +00:00
set nats maxreconnects to unlimited
This commit is contained in:
parent
be8008b5a0
commit
d9cd986426
1 changed files with 2 additions and 1 deletions
|
@ -102,7 +102,8 @@ func NewServer(c *Configuration) (*server, error) {
|
|||
}
|
||||
}
|
||||
|
||||
conn, err := nats.Connect(c.BrokerAddress, opt)
|
||||
// Setting MaxReconnects to -1 which equals unlimited.
|
||||
conn, err := nats.Connect(c.BrokerAddress, opt, nats.MaxReconnects(-1))
|
||||
if err != nil {
|
||||
er := fmt.Errorf("error: nats.Connect failed: %v", err)
|
||||
return nil, er
|
||||
|
|
Loading…
Reference in a new issue