mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-06 14:33:10 -06:00
Minor memory improvement
This commit is contained in:
parent
f3430bb21d
commit
bed7dc70c0
|
|
@ -150,6 +150,11 @@ func (s *ServerACLs) OnServerACLUpdate(strippedEvent tables.StrippedEvent) {
|
|||
"num_allowed": len(acls.allowedRegexes),
|
||||
"num_denied": len(acls.deniedRegexes),
|
||||
}).Debugf("Updating server ACLs for %q", strippedEvent.RoomID)
|
||||
|
||||
// Clear out Denied and Allowed, now that we have the compiled regexes.
|
||||
// They are not needed anymore from this point on.
|
||||
acls.Denied = nil
|
||||
acls.Allowed = nil
|
||||
s.aclsMutex.Lock()
|
||||
defer s.aclsMutex.Unlock()
|
||||
s.acls[strippedEvent.RoomID] = acls
|
||||
|
|
|
|||
Loading…
Reference in a new issue