mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 11:48:43 -07:00
@@ -1056,6 +1056,10 @@ func (s *Server) initLeafNodeSmap(c *client) int {
|
||||
} else {
|
||||
acc.sl.All(&subs)
|
||||
}
|
||||
|
||||
// Check if we have an existing service import reply.
|
||||
siReply := acc.siReply
|
||||
|
||||
// Since leaf nodes only send on interest, if the bound
|
||||
// account has import services we need to send those over.
|
||||
for isubj := range acc.imports.services {
|
||||
@@ -1117,6 +1121,13 @@ func (s *Server) initLeafNodeSmap(c *client) int {
|
||||
// if this is coming back to us.
|
||||
c.leaf.smap[lds]++
|
||||
|
||||
// Check if we need to add an existing siReply to our map.
|
||||
// This will be a prefix so add on the wildcard.
|
||||
if siReply != nil {
|
||||
wcsub := append(siReply, '>')
|
||||
c.leaf.smap[string(wcsub)]++
|
||||
}
|
||||
|
||||
lenMap := len(c.leaf.smap)
|
||||
c.mu.Unlock()
|
||||
return lenMap
|
||||
|
||||
Reference in New Issue
Block a user