mirror of
https://github.com/safing/portmaster
synced 2025-09-01 18:19:12 +00:00
Fix incorrect read-lock for filterlist bloom filter
This commit is contained in:
parent
85af94c063
commit
09bba4198a
1 changed files with 3 additions and 3 deletions
|
@ -6,9 +6,9 @@ import (
|
|||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/tannerryan/ring"
|
||||
"github.com/safing/portbase/database/record"
|
||||
"github.com/safing/portbase/log"
|
||||
"github.com/tannerryan/ring"
|
||||
)
|
||||
|
||||
var defaultFilter = newScopedBloom()
|
||||
|
@ -66,8 +66,8 @@ func (bf *scopedBloom) getBloomForType(entityType string) (*ring.Ring, error) {
|
|||
}
|
||||
|
||||
func (bf *scopedBloom) add(scope, value string) {
|
||||
bf.rw.RLock()
|
||||
defer bf.rw.RUnlock()
|
||||
bf.rw.Lock()
|
||||
defer bf.rw.Unlock()
|
||||
|
||||
r, err := bf.getBloomForType(scope)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Reference in a new issue