Merge pull request #1334 from nats-io/leafnode_bug

Fix for bug when requestor and leafnode on same server.
This commit is contained in:
Derek Collison
2020-04-10 08:51:31 -07:00
committed by GitHub
3 changed files with 43 additions and 1 deletions

View File

@@ -1045,6 +1045,8 @@ func (a *Account) createRespWildcard() []byte {
a.siReplyClient = c
a.mu.Unlock()
}
// Now check on leafnode updates.
s.updateLeafNodes(a, sub, 1)
}
return pre

View File

@@ -1493,8 +1493,8 @@ func (c *client) processLeafMsgArgs(arg []byte) error {
// processInboundLeafMsg is called to process an inbound msg from a leaf node.
func (c *client) processInboundLeafMsg(msg []byte) {
// Update statistics
c.in.msgs++
// The msg includes the CR_LF, so pull back out for accounting.
c.in.msgs++
c.in.bytes += int32(len(msg) - LEN_CR_LF)
// Check pub permissions