We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents adacbc2 + 390ae7d commit 9efc1deCopy full SHA for 9efc1de
datastore.go
@@ -342,6 +342,9 @@ func (d *Datastore) Delete(key ds.Key) error {
342
func (d *Datastore) Query(q dsq.Query) (dsq.Results, error) {
343
d.closeLk.RLock()
344
defer d.closeLk.RUnlock()
345
+ if d.closed {
346
+ return nil, ErrClosed
347
+ }
348
349
txn := d.newImplicitTransaction(true)
350
// We cannot defer txn.Discard() here, as the txn must remain active while the iterator is open.
0 commit comments