mirror of
https://github.com/safing/portmaster
synced 2025-09-02 10:39:22 +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"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/tannerryan/ring"
|
|
||||||
"github.com/safing/portbase/database/record"
|
"github.com/safing/portbase/database/record"
|
||||||
"github.com/safing/portbase/log"
|
"github.com/safing/portbase/log"
|
||||||
|
"github.com/tannerryan/ring"
|
||||||
)
|
)
|
||||||
|
|
||||||
var defaultFilter = newScopedBloom()
|
var defaultFilter = newScopedBloom()
|
||||||
|
@ -66,8 +66,8 @@ func (bf *scopedBloom) getBloomForType(entityType string) (*ring.Ring, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (bf *scopedBloom) add(scope, value string) {
|
func (bf *scopedBloom) add(scope, value string) {
|
||||||
bf.rw.RLock()
|
bf.rw.Lock()
|
||||||
defer bf.rw.RUnlock()
|
defer bf.rw.Unlock()
|
||||||
|
|
||||||
r, err := bf.getBloomForType(scope)
|
r, err := bf.getBloomForType(scope)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Add table
Reference in a new issue