Merge branch 'main' into dev

This commit is contained in:
Derek Collison
2023-02-28 15:17:24 -08:00
15 changed files with 358 additions and 231 deletions

View File

@@ -888,7 +888,13 @@ func (s *Server) createLeafNode(conn net.Conn, rURL *url.URL, remote *leafNodeCf
}
now := time.Now().UTC()
c := &client{srv: s, nc: conn, kind: LEAF, opts: defaultOpts, mpay: maxPay, msubs: maxSubs, start: now, last: now}
var clientOpts = ClientOpts{
Name: opts.ServerName,
Verbose: defaultOpts.Verbose,
Pedantic: defaultOpts.Pedantic,
Echo: defaultOpts.Echo,
}
c := &client{srv: s, nc: conn, kind: LEAF, opts: clientOpts, mpay: maxPay, msubs: maxSubs, start: now, last: now}
// Do not update the smap here, we need to do it in initLeafNodeSmapAndSendSubs
c.leaf = &leaf{}