don't nil the mark sets on close, it's dangerous.

a concurrent marking can panic.
This commit is contained in:
vyzo 2021-07-07 21:27:36 +03:00
parent aec2ba2c82
commit c6421f8a75
2 changed files with 0 additions and 12 deletions

View File

@ -88,11 +88,5 @@ func (s *BloomMarkSet) Has(cid cid.Cid) (bool, error) {
} }
func (s *BloomMarkSet) Close() error { func (s *BloomMarkSet) Close() error {
if s.ts {
s.mx.Lock()
defer s.mx.Unlock()
}
s.bf = nil
return nil return nil
} }

View File

@ -57,11 +57,5 @@ func (s *MapMarkSet) Has(cid cid.Cid) (bool, error) {
} }
func (s *MapMarkSet) Close() error { func (s *MapMarkSet) Close() error {
if s.ts {
s.mx.Lock()
defer s.mx.Unlock()
}
s.set = nil
return nil return nil
} }