mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Always check for pruning
This commit is contained in:
@@ -895,10 +895,10 @@ func (c *client) processMsg(msg []byte) {
|
||||
}
|
||||
if !ok {
|
||||
r := c.perms.pub.Match(string(c.pa.subject))
|
||||
if len(r.psubs) == 0 {
|
||||
notAllowed := len(r.psubs) == 0
|
||||
if notAllowed {
|
||||
c.pubPermissionViolation(c.pa.subject)
|
||||
c.perms.pcache[string(c.pa.subject)] = false
|
||||
return
|
||||
} else {
|
||||
c.perms.pcache[string(c.pa.subject)] = true
|
||||
}
|
||||
@@ -914,6 +914,10 @@ func (c *client) processMsg(msg []byte) {
|
||||
}
|
||||
}
|
||||
}
|
||||
// Return here to allow the pruning code to run if needed.
|
||||
if notAllowed {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user