don't nil the mark sets on close, it's dangerous.
a concurrent marking can panic.
This commit is contained in:
parent
aec2ba2c82
commit
c6421f8a75
@ -88,11 +88,5 @@ func (s *BloomMarkSet) Has(cid cid.Cid) (bool, error) {
|
||||
}
|
||||
|
||||
func (s *BloomMarkSet) Close() error {
|
||||
if s.ts {
|
||||
s.mx.Lock()
|
||||
defer s.mx.Unlock()
|
||||
|
||||
}
|
||||
s.bf = nil
|
||||
return nil
|
||||
}
|
||||
|
@ -57,11 +57,5 @@ func (s *MapMarkSet) Has(cid cid.Cid) (bool, error) {
|
||||
}
|
||||
|
||||
func (s *MapMarkSet) Close() error {
|
||||
if s.ts {
|
||||
s.mx.Lock()
|
||||
defer s.mx.Unlock()
|
||||
|
||||
}
|
||||
s.set = nil
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user