mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-05 08:10:50 +00:00
Merge pull request #1301 from molecula/fix-rbf-cursor-close
This commit is contained in:
commit
1865de8248
1 changed files with 3 additions and 0 deletions
|
|
@ -1388,7 +1388,10 @@ func (c *Cursor) difference(key uint64, data *roaring.Container) (bool, error) {
|
|||
func (c *Cursor) Close() {
|
||||
if c == nil {
|
||||
panic("cannot Close nil Cursor")
|
||||
} else if c.tx == nil || c.tx.db == nil {
|
||||
return // already closed
|
||||
}
|
||||
|
||||
tx := c.tx
|
||||
c.tx = nil // allow tx to be garbage collected.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue