mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
The func subjectIsSubsetMatch() is heavy so do without the account lock.
Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
@@ -1717,14 +1717,15 @@ func (a *Account) checkForReverseEntries(reply string, checkInterest, recursed b
|
||||
var _rs [64]string
|
||||
rs := _rs[:0]
|
||||
for k := range a.imports.rrMap {
|
||||
if subjectIsSubsetMatch(k, reply) {
|
||||
rs = append(rs, k)
|
||||
}
|
||||
rs = append(rs, k)
|
||||
}
|
||||
a.mu.RUnlock()
|
||||
|
||||
// subjectIsSubsetMatch is heavy so make sure we do this without the lock.
|
||||
for _, r := range rs {
|
||||
a._checkForReverseEntry(r, nil, checkInterest, recursed)
|
||||
if subjectIsSubsetMatch(r, reply) {
|
||||
a._checkForReverseEntry(r, nil, checkInterest, recursed)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user